adding systemd files

This commit is contained in:
Andrew Davidson 2021-09-29 20:27:25 -07:00
parent 6266e3977a
commit de3e59db98
Signed by: amd
GPG key ID: 17AF8F2A49CF25C6
2 changed files with 28 additions and 0 deletions

11
backup.sh.service Normal file
View 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
View 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