@ 260802.2

260615.3 · 98792b1dab553d0ac9a206e40c10643d28cc57f5

*: a near complete overhaul of some fundamental components

Particularly, the `video` script and how Wingo boots. We consolidate much here and avoid separate init scripts for each machine. They were a huge pain to maintain and frequently got out of sync from one another.

We do still have some case analysis, which is annoying. But a foolish consistency is the hobgoblin of little minds.

reading declarations

Changes to .systemd.sh. All files

.systemd.sh

@@ -2,78 +2,114 @@  # simplified systemd command, for instance # "sudo systemctl stop xxx" - > "0.stop xxx"-if ! cmd-exists systemd-notify || ! systemd-notify --booted;-then  # for not systemd-    0.start() {-        sudo rc.d start "$@"-    }+0.reboot() {+    systemctl reboot "$@"+} -    0.restart() {-        sudo rc.d restart "$@"-    }+0.off() {+    systemctl poweroff "$@"+} -    0.stop() {-        sudo rc.d stop "$@"-    }-else-    0.reboot() {-        systemctl reboot "$@"-    }+# start systemd service+0.start() {+    sudo systemctl start "$@"+}+# restart systemd service+0.restart() {+    sudo systemctl restart "$@"+}+# stop systemd service+0.stop() {+    sudo systemctl stop "$@"+}+# enable systemd service+0.enable() {+    sudo systemctl enable "$@"+}+# disable a systemd service+0.disable() {+    sudo systemctl disable "$@"+}+# show the status of a service+0.status() {+    systemctl status "$@"+}+# reload a service configuration+0.reload() {+    sudo systemctl --system daemon-reload+}+# list all running service+0.list() {+    systemctl+}+# list all failed service+0.failed () {+    systemctl --failed+}+# list all systemd available unit files+0.list-files() {+    systemctl list-unit-files+}+# check the log+0.log() {+    sudo journalctl --follow --this-boot "$@"+}+# show wants+0.wants() {+    systemctl show -p "Wants" $1.target+}+# analyze the system+0.analyze() {+    systemd-analyze "$@"+} -    0.off() {-        systemctl poweroff "$@"-    }+# Same as above, but for user services. -    # start systemd service-    0.start() {-        sudo systemctl start "$@"-    }-    # restart systemd service-    0.restart() {-        sudo systemctl restart "$@"-    }-    # stop systemd service-    0.stop() {-        sudo systemctl stop "$@"-    }-    # enable systemd service-    0.enable() {-        sudo systemctl enable "$@"-    }-    # disable a systemd service-    0.disable() {-        sudo systemctl disable "$@"-    }-    # show the status of a service-    0.status() {-        systemctl status "$@"-    }-    # reload a service configuration-    0.reload() {-        sudo systemctl --system daemon-reload-    }-    # list all running service-    0.list() {-        systemctl-    }-    # list all failed service-    0.failed () {-        systemctl --failed-    }-    # list all systemd available unit files-    0.list-files() {-        systemctl list-unit-files-    }-    # check the log-    0.log() {-        sudo journalctl --follow --this-boot "$@"-    }-    # show wants-    0.wants() {-        systemctl show -p "Wants" $1.target-    }-    # analyze the system-    0.analyze() {-        systemd-analyze "$@"-    }-fi+# start systemd service+1.start() {+    systemctl --user start "$@"+}+# restart systemd service+1.restart() {+    systemctl --user restart "$@"+}+# stop systemd service+1.stop() {+    systemctl --user stop "$@"+}+# enable systemd service+1.enable() {+    systemctl --user enable "$@"+}+# disable a systemd service+1.disable() {+    systemctl --user disable "$@"+}+# show the status of a service+1.status() {+    systemctl --user status "$@"+}+# reload a service configuration+1.reload() {+    systemctl --user daemon-reload+}+# list all running service+1.list() {+    systemctl --user+}+# list all failed service+1.failed () {+    systemctl --user --failed+}+# list all systemd available unit files+1.list-files() {+    systemctl --user list-unit-files+}+# check the log+1.log() {+    journalctl --user --follow --this-boot "$@"+}+# show wants+1.wants() {+    systemctl show -p "Wants" $1.target+}