added systemd service files and cronjob example

This commit is contained in:
Hendrik Schutter 2022-06-20 18:05:34 +02:00
parent 1ad6d2bab1
commit a6f933c5d5
3 changed files with 26 additions and 0 deletions

11
CheckAutoBackup.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Check AutoBackup
After=syslog.target network.target
[Service]
RestartSec=2s
Type=oneshot
User=root
Group=root
ExecStart=/root/check_AutoBackup.sh
[Install]
WantedBy=multi-user.target

7
CheckAutoBackup.timer Normal file
View File

@ -0,0 +1,7 @@
[Unit]
Description=Check AutoBackup Timer
[Timer]
Persistent=false
OnCalendar=*-*-* 2,8,14,20:05:00
[Install]
WantedBy=basic.target

View File

@ -45,6 +45,14 @@ repos_interval[0]=21600 #sec
repos_interval_tolerance[0]=10 #%
```
#### 6. install crontab or systemd-timer
For systemd see
`CheckAutoBackup.service` and `CheckAutoBackup.timer`
For corntab see
```
5 2,8,14,20 * * * /root/check_AutoBackup.sh >/dev/null 2>&
```
#### 7. optional install FTDI simple alarm