diff options
author | Erich Eckner <git@eckner.net> | 2022-07-28 13:28:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-07-28 13:28:23 +0200 |
commit | c06bf9e5efe0179c26d201ba32251a19a4557c33 (patch) | |
tree | ac404207df5a5800d7e72b21df613914dab86c6b | |
parent | 207a3e9fc1be53683d2dcc74f1640b446742aff8 (diff) | |
download | raspi-lights-out-c06bf9e5efe0179c26d201ba32251a19a4557c33.tar.xz |
add service and timer for colocation update
-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 |