mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 01:29:53 +07:00
update: add backup logic
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
843fa0aa30
commit
8e2794c1bf
@ -430,8 +430,9 @@ function updateLKMs() {
|
|||||||
function updateOffline() {
|
function updateOffline() {
|
||||||
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
local ARCOFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||||
if [ "${ARCOFFLINE}" != "true" ]; then
|
if [ "${ARCOFFLINE}" != "true" ]; then
|
||||||
rm -f "${CONFIGS_PATH}/offline.json"
|
cp -f "${CONFIGS_PATH}/offline.json" "${CONFIGS_PATH}/offline.json.bak"
|
||||||
curl -skL "https://autoupdate.synology.com/os/v2" -o "${CONFIGS_PATH}/offline.json"
|
curl -skL "https://autoupdate.synology.com/os/v2" -o "${CONFIGS_PATH}/offline.json"
|
||||||
|
[ ! -f "${CONFIGS_PATH}/offline.json" ] && cp -f "${CONFIGS_PATH}/offline.json.bak" "${CONFIGS_PATH}/offline.json"
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user