mirror of
https://github.com/unraid/webgui.git
synced 2026-01-01 23:20:35 -06:00
21 lines
369 B
Bash
Executable File
21 lines
369 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# run & log functions
|
|
. /etc/rc.d/rc.runlog
|
|
|
|
queue(){
|
|
atq | grep -Pom1 '^\d+'
|
|
}
|
|
|
|
JOB=$(queue)
|
|
if [[ -n $JOB ]]; then
|
|
atrm $JOB 2>/dev/null
|
|
log "remove queued job $JOB"
|
|
else
|
|
log "no queued job present"
|
|
fi
|
|
|
|
echo "/usr/local/emhttp/webGui/scripts/reload_services ${1:-1}" | at -M now 2>/dev/null
|
|
log "queue new job $(queue), wait for ${1:-1}s"
|
|
exit 0
|