mirror of
https://github.com/unraid/api.git
synced 2026-01-06 08:39:54 -06:00
@@ -79,9 +79,11 @@ flush() {
|
||||
# wait for existing git commands to finish before flushing
|
||||
_waitforgitlog "${FAST}"
|
||||
logger "flush: ${TASKACTION}" --tag flash_backup
|
||||
# push any changes ad-hoc
|
||||
# shellcheck disable=SC2086
|
||||
echo "${TASKACTION}_nolimit &>/dev/null" | at ${QUEUE} -M now &>/dev/null
|
||||
# if _connected, push any changes ad-hoc
|
||||
if _connected; then
|
||||
# shellcheck disable=SC2086
|
||||
echo "${TASKACTION}_nolimit &>/dev/null" | at ${QUEUE} -M now &>/dev/null
|
||||
fi
|
||||
}
|
||||
_watching() {
|
||||
local flash_backup_pid
|
||||
@@ -96,10 +98,13 @@ _watch() {
|
||||
_clearlocks
|
||||
# flush: this will ensure we start with a clean repo
|
||||
flush
|
||||
# wait for flush to complete
|
||||
sleep 3
|
||||
_waitforgitlog "${FAST}"
|
||||
logger "start watching for file changes" --tag flash_backup
|
||||
# start watcher loop
|
||||
while true; do
|
||||
# wait for system to be connected to Unraid Connect Cloud, then process flash backups
|
||||
# if system is connected to Unraid Connect Cloud, see if there are updates to process
|
||||
_connected && _f1
|
||||
sleep 60
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user