From bd9f4651da49ac3fc2aa9b43c78aab40d75d7b76 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 16 Jan 2019 20:12:10 +0100 Subject: ship systemd service and timer file --- Makefile | 2 ++ update-ddns.service | 9 +++++++++ update-ddns.timer | 10 ++++++++++ 3 files changed, 21 insertions(+) create mode 100644 update-ddns.service create mode 100644 update-ddns.timer diff --git a/Makefile b/Makefile index edcbfc9..a408694 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ DESTDIR = ETCDIR = /etc BINDIR = /usr/bin +LIBDIR = /usr/lib MANDIR = /usr/share/man VERSION = 0.1.7 @@ -42,6 +43,7 @@ all: update-ddns install: all install -D -m0755 update-ddns $(DESTDIR)$(BINDIR)/update-ddns install -D -m0644 update-ddns.conf $(DESTDIR)$(ETCDIR)/update-ddns.conf + install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system update-ddns.service update-ddns.timer clean: ls -A | \ diff --git a/update-ddns.service b/update-ddns.service new file mode 100644 index 0000000..0902831 --- /dev/null +++ b/update-ddns.service @@ -0,0 +1,9 @@ +[Unit] +Description=update ddns entries +After=network-online.target +Requires=network-online.target + +[Service] +User=nobody +Type=simple +ExecStart=/usr/bin/update-ddns diff --git a/update-ddns.timer b/update-ddns.timer new file mode 100644 index 0000000..6e4fada --- /dev/null +++ b/update-ddns.timer @@ -0,0 +1,10 @@ +[Unit] +Description=update ddns entries about every 10 minutes + +[Timer] +AccuracySec=1us +RandomizedDelaySec=10min +OnCalendar=*-*-* *:00/10:00 + +[Install] +WantedBy=timers.target -- cgit v1.2.3-70-g09d2