mirror of
https://github.com/unraid/webgui.git
synced 2026-01-26 19:48:55 -06:00
Services: move sleep to upper layer to improve accuracy
This commit is contained in:
@@ -8,9 +8,6 @@ queue(){
|
||||
atq | grep -Pom1 '^\d+'
|
||||
}
|
||||
|
||||
# delayed execution
|
||||
sleep ${1:-1}
|
||||
|
||||
JOB=$(queue)
|
||||
if [[ -n $JOB ]]; then
|
||||
atrm $JOB 2>/dev/null
|
||||
|
||||
@@ -15,6 +15,6 @@ else
|
||||
log "no queued job present"
|
||||
fi
|
||||
|
||||
echo "/usr/local/emhttp/webGui/scripts/reload_services ${1:-1}" | at -M now 2>/dev/null
|
||||
echo "sleep ${1:-1}; /usr/local/emhttp/webGui/scripts/reload_services" | at -M now 2>/dev/null
|
||||
log "queue new job $(queue), wait for ${1:-1}s"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user