diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/os/services/kvmd-oled-reboot.service | 12 | ||||
-rw-r--r-- | configs/os/services/kvmd-oled-shutdown.service | 14 | ||||
-rw-r--r-- | configs/os/services/kvmd-oled.service | 15 |
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 |