diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | lights-out-colocation-update.service.in | 8 | ||||
-rw-r--r-- | lights-out-colocation-update.timer.in | 10 |
4 files changed, 22 insertions, 2 deletions
@@ -1,4 +1,6 @@ index.php +lights-out-colocation-update.service +lights-out-colocation-update.timer lights-out-init.service lights-out lights-out@.service @@ -28,7 +28,7 @@ HTTPDIR = /srv/http/lights-out VERSION = 0.2 -all: index.php lights-out lights-out-init.service lights-out@.service +all: index.php lights-out lights-out-init.service lights-out@.service lights-out-colocation-update.service lights-out-colocation-update.timer %: %.in sed " \ @@ -43,7 +43,7 @@ all: index.php lights-out lights-out-init.service lights-out@.service install: all install -D -m0755 -t $(DESTDIR)$(BINDIR) lights-out - install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system lights-out@.service lights-out-init.service + install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system lights-out@.service lights-out-init.service lights-out-colocation-update.service lights-out-colocation-update.timer install -D -m0644 -t $(DESTDIR)$(ETCDIR) lights-out.conf install -D -m0644 -t $(DESTDIR)$(HTTPDIR)/httpdocs index.php install -D -m0600 -o http -g http /dev/null $(DESTDIR)$(HTTPDIR)/password diff --git a/lights-out-colocation-update.service.in b/lights-out-colocation-update.service.in new file mode 100644 index 0000000..9491eb4 --- /dev/null +++ b/lights-out-colocation-update.service.in @@ -0,0 +1,8 @@ +[Unit] +Description=lights out update colocation +Needs=lights-out-init.service +After=lights-out-init.service + +[Service] +Type=oneshot +ExecStart=#BINDIR#/lights-out colocation update diff --git a/lights-out-colocation-update.timer.in b/lights-out-colocation-update.timer.in new file mode 100644 index 0000000..115cde8 --- /dev/null +++ b/lights-out-colocation-update.timer.in @@ -0,0 +1,10 @@ +[Unit] +Description=update colocation every few minutes + +[Timer] +OnCalendar=*:*/10:00 +RandomizedDelaySec=600 +FixedRandomDelay=True + +[Install] +WantedBy=timers.target |