1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2020-09-23 09:53:12 +02:00
parent a09f7ab847
commit 175e97b130

View file

@ -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)
}
}