mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 09:10:07 -06:00
Revised service reload functionality
This commit is contained in:
@@ -2,11 +2,10 @@
|
||||
SERVICES="sshd avahidaemon samba rpc nfsd ntpd nginx"
|
||||
job=/tmp/atjob.tmp
|
||||
|
||||
[[ -n $1 && -e $job ]] && exit 0
|
||||
touch $job
|
||||
for cmd in $SERVICES; do
|
||||
if /etc/rc.d/rc.$cmd update; then
|
||||
/etc/rc.d/rc.$cmd reload >/dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
rm -f $job
|
||||
exit 0
|
||||
|
||||
@@ -222,8 +222,10 @@ done
|
||||
/usr/bin/mv $ini ${ini%.*}
|
||||
|
||||
# delayed execution
|
||||
rm -f $job
|
||||
echo "sleep 35;$reload job"|at -M now 2>/dev/null
|
||||
if [[ ! -f $job ]]; then
|
||||
echo "sleep 35;$reload"|at -M now 2>/dev/null
|
||||
touch $job
|
||||
fi
|
||||
|
||||
# send update information
|
||||
if [[ -n $interface && -n $data && -e /var/run/nginx.socket ]]; then
|
||||
|
||||
Reference in New Issue
Block a user