+bin/shutdown-detect*
[nethome.git] / bin / shutdown-detect.service
diff --git a/bin/shutdown-detect.service b/bin/shutdown-detect.service
new file mode 100644 (file)
index 0000000..88cd5a1
--- /dev/null
@@ -0,0 +1,15 @@
+# jankratochvil:
+# ln -s ../../../root/bin/shutdown-detect.service /etc/systemd/system/shutdown-detect.service; systemctl enable shutdown-detect.service
+# https://unix.stackexchange.com/a/41756/296319
+
+[Unit]
+Description=shutdown-detect
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/root/bin/shutdown-detect-boot
+ExecStop=/root/bin/shutdown-detect
+
+[Install]
+WantedBy=multi-user.target