]> rtime.felk.cvut.cz Git - novaboot.git/blobdiff - server/systemd/novaboot-power-off@.timer
server: Fix enabling of delayed power off
[novaboot.git] / server / systemd / novaboot-power-off@.timer
index b0596d4b315f687f5510ce199d8c87acec061817..fd53565bb91d347a89508f828f0c6c2d1f390130 100644 (file)
@@ -1,3 +1,10 @@
+[Unit]
+# Don't allow starting the timer if the target is already powered off
+Requisite=novaboot-power@%i.service
+After=novaboot-power@%i.service
+# If somebody powers off the target explicitly stop the timer (if running) too
+PartOf=novaboot-power@%i.service
+
 [Timer]
 OnActiveSec=10min
 Unit=novaboot-power-off@%i.service