mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Set backup date after sending backup to VPS
This commit is contained in:
		
							parent
							
								
									a09f7ab847
								
							
						
					
					
						commit
						175e97b130
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1283,10 +1283,11 @@ _backup_send() {
 | 
			
		|||
	backup_data="$(cat /tmp/backup.tar.gz | base64 | tr -d '\n')"
 | 
			
		||||
	backup_sha256sum="$(sha256sum /tmp/backup.tar.gz | awk '{print $1}')"
 | 
			
		||||
	[ -n "$backup_data" ] && {
 | 
			
		||||
		logger -t "OMR-VPS" "Send backup file to server"
 | 
			
		||||
		logger -t "OMR-VPS" "Send backup file to server $servername"
 | 
			
		||||
		local backupjson
 | 
			
		||||
		backupjson='{"data": "'$backup_data'","sha256sum": "'$backup_sha256sum'"}'
 | 
			
		||||
		_set_json "backuppost" "$backupjson"
 | 
			
		||||
		uci -q set openmptcprouter.$servername.lastbackup=$(date +%s)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue