mirror of https://github.com/digint/btrbk
contrib: systemd: run units only with existing config file
It does not make sense for the timer or the service to be started (the latter when done so manually) when neither of the two default config files exists. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>pull/498/head
parent
87eeefa0ca
commit
c9d95a6302
|
@ -1,6 +1,8 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=btrbk backup
|
Description=btrbk backup
|
||||||
Documentation=man:btrbk(1)
|
Documentation=man:btrbk(1)
|
||||||
|
ConditionPathExists=|@CONFDIR@/btrbk/btrbk.conf
|
||||||
|
ConditionPathExists=|@CONFDIR@/btrbk.conf
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=btrbk daily backup
|
Description=btrbk daily backup
|
||||||
|
ConditionPathExists=|@CONFDIR@/btrbk/btrbk.conf
|
||||||
|
ConditionPathExists=|@CONFDIR@/btrbk.conf
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar=hourly
|
OnCalendar=hourly
|
||||||
|
|
Loading…
Reference in New Issue