added systemd service files and cronjob example
This commit is contained in:
parent
1ad6d2bab1
commit
a6f933c5d5
|
@ -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
|
|
@ -0,0 +1,7 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Check AutoBackup Timer
|
||||||
|
[Timer]
|
||||||
|
Persistent=false
|
||||||
|
OnCalendar=*-*-* 2,8,14,20:05:00
|
||||||
|
[Install]
|
||||||
|
WantedBy=basic.target
|
|
@ -45,6 +45,14 @@ repos_interval[0]=21600 #sec
|
||||||
repos_interval_tolerance[0]=10 #%
|
repos_interval_tolerance[0]=10 #%
|
||||||
```
|
```
|
||||||
#### 6. install crontab or systemd-timer
|
#### 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
|
#### 7. optional install FTDI simple alarm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue