adding systemd files
This commit is contained in:
parent
6266e3977a
commit
de3e59db98
2 changed files with 28 additions and 0 deletions
11
backup.sh.service
Normal file
11
backup.sh.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run backup.sh as configured
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=XDG_CONFIG_HOME=/home/FIXME/.config
|
||||||
|
Environment=XDG_DATA_HOME=/home/FIXME/.local/share
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/home/FIXME/.local/share/backup.sh/backup.sh backup FIXME
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
17
backup.sh.timer
Normal file
17
backup.sh.timer
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run backup.sh at specified interval
|
||||||
|
RefuseManualStart=no # Allow manual starts
|
||||||
|
RefuseManualStop=no # Allow manual stops
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
# Execute job if it missed a run due to machine being off
|
||||||
|
Persistent=true
|
||||||
|
# Run 15 minutes after boot for the first time
|
||||||
|
OnBootSec=900
|
||||||
|
# Run every 24 hours thereafter
|
||||||
|
OnUnitInactiveSec=86400
|
||||||
|
# File describing job to execute
|
||||||
|
Unit=backup.sh.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in a new issue