forked from CopterSicht/Restic-Backend-Watchdog
		
	added systemd service files and cronjob example
This commit is contained in:
		
							
								
								
									
										11
									
								
								CheckAutoBackup.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								CheckAutoBackup.service
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										7
									
								
								CheckAutoBackup.timer
									
									
									
									
									
										Normal file
									
								
							@ -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 #%
 | 
			
		||||
```
 | 
			
		||||
#### 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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user