diff options
author | Erich Eckner <git@eckner.net> | 2019-02-03 11:14:41 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-03 11:14:41 +0100 |
commit | b2d7cbe56d536ea303940d912566659663abcd69 (patch) | |
tree | 2da4cce2667544012611faaa5541f2b25a7ed778 | |
parent | 7084cd8c95187949d2ed534149c9f1ba04169332 (diff) | |
download | hardlinkedBackups-b2d7cbe56d536ea303940d912566659663abcd69.tar.xz |
systemd service and timer files new
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | backup@.service.in | 8 | ||||
-rw-r--r-- | backup@.timer.in | 10 |
4 files changed, 23 insertions, 1 deletions
@@ -1,4 +1,6 @@ backup +backup@.service +backup@.timer backupStatistics fastRepair lastBackups @@ -23,11 +23,12 @@ SHELL = /bin/bash DESTDIR = ETCDIR = /etc BINDIR = /usr/bin +LIBDIR = /usr/lib MANDIR = /usr/share/man VERSION = 1.3.1 -all: man.commons backup backup.1 backupStatistics backupStatistics.1 lastBackups lastBackups.1 removeOldBackups removeOldBackups.1 +all: man.commons backup backup.1 backup@.service backup@.timer backupStatistics backupStatistics.1 lastBackups lastBackups.1 removeOldBackups removeOldBackups.1 %: %.in sed " \ @@ -47,6 +48,7 @@ all: man.commons backup backup.1 backupStatistics backupStatistics.1 lastBackups install: all install -D -m0755 -t $(DESTDIR)$(BINDIR) backup backupStatistics lastBackups removeOldBackups + install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system backup@.service backup@.timer install -D -m0644 -t $(DESTDIR)$(MANDIR)/man1 backup.1 backupStatistics.1 lastBackups.1 removeOldBackups.1 install -D -m0644 -t $(DESTDIR)$(ETCDIR) backup.conf diff --git a/backup@.service.in b/backup@.service.in new file mode 100644 index 0000000..c2410ac --- /dev/null +++ b/backup@.service.in @@ -0,0 +1,8 @@ +[Unit] +Description=Backup %I. +Requires=network-online.target local-fs.target +After=network-online.target local-fs.target + +[Service] +Type=simple +ExecStart=#BINDIR#/backup %I diff --git a/backup@.timer.in b/backup@.timer.in new file mode 100644 index 0000000..2056876 --- /dev/null +++ b/backup@.timer.in @@ -0,0 +1,10 @@ +[Unit] +Description=Periodically backup %I. + +[Timer] +AccuracySec=1us +RandomizedDelaySec=10min +OnCalendar=*-*-* *:00/10:00 + +[Install] +WantedBy=timers.target |