1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge branch 'test' into develop

This commit is contained in:
suyuan 2020-09-23 23:38:57 +08:00
commit a0eb87506a
15 changed files with 299 additions and 97 deletions

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

View file

@ -0,0 +1,19 @@
#!/bin/sh
if [ "$(uci -q get wireless.radio0)" != "" ];
if [ "$(uci -q get wireless.radio0.country)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set wireless.radio0.country='00'
set wireless.default_radio0.skip_inactivity_poll='1'
commit wireless
EOF
fi
if [ "$(uci -q get wireless.default_radio0.network)" = "lan" ]; then
uci -q batch <<-EOF >/dev/null
set wireless.default_radio0.network='wifi'
commit wireless
EOF
fi
fi
exit 0