summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-09-11 20:22:49 +0300
committerMaxim Devaev <[email protected]>2024-09-11 20:22:49 +0300
commit56da910ebe9dc0ec496b8a0e7e9b89c5d531f7a4 (patch)
tree6fbc4221fff8f9519316bdf3e4e78bf04d9e690f /configs
parent40393acf67ff9421d94604284d37a560f8f7e711 (diff)
moved kvmd-oled to this repo
Diffstat (limited to 'configs')
-rw-r--r--configs/os/services/kvmd-oled-reboot.service12
-rw-r--r--configs/os/services/kvmd-oled-shutdown.service14
-rw-r--r--configs/os/services/kvmd-oled.service15
3 files changed, 41 insertions, 0 deletions
diff --git a/configs/os/services/kvmd-oled-reboot.service b/configs/os/services/kvmd-oled-reboot.service
new file mode 100644
index 00000000..23bbca15
--- /dev/null
+++ b/configs/os/services/kvmd-oled-reboot.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=PiKVM - Display reboot message on the OLED
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "kill -USR1 `systemctl show -P MainPID kvmd-oled`"
+ExecStop=/bin/true
+RemainAfterExit=yes
+
+[Install]
+WantedBy=reboot.target
diff --git a/configs/os/services/kvmd-oled-shutdown.service b/configs/os/services/kvmd-oled-shutdown.service
new file mode 100644
index 00000000..61d94c51
--- /dev/null
+++ b/configs/os/services/kvmd-oled-shutdown.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=PiKVM - Display shutdown message on the OLED
+Conflicts=reboot.target
+Before=shutdown.target poweroff.target halt.target
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "kill -USR2 `systemctl show -P MainPID kvmd-oled`"
+ExecStop=/bin/true
+RemainAfterExit=yes
+
+[Install]
+WantedBy=shutdown.target
diff --git a/configs/os/services/kvmd-oled.service b/configs/os/services/kvmd-oled.service
new file mode 100644
index 00000000..ea0d4850
--- /dev/null
+++ b/configs/os/services/kvmd-oled.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=PiKVM - A small OLED daemon
+After=systemd-modules-load.service
+ConditionPathExists=/dev/i2c-1
+
+[Service]
+Type=simple
+Restart=always
+RestartSec=3
+ExecStartPre=/usr/bin/kvmd-oled --interval=3 --clear-on-exit [email protected]
+ExecStart=/usr/bin/kvmd-oled
+TimeoutStopSec=3
+
+[Install]
+WantedBy=multi-user.target