mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 16:59:27 -05:00
services: add logging
This commit is contained in:
@@ -4,6 +4,7 @@ SERVICES="rpc nfsd ntpd nginx sshd avahidaemon samba"
|
||||
if [[ -n $1 ]]; then
|
||||
[[ ! -e $1 ]] && touch $1 || exit 0
|
||||
fi
|
||||
logger -t network "reload services: ${1:-direct}"
|
||||
for cmd in $SERVICES; do
|
||||
if /etc/rc.d/rc.$cmd update; then
|
||||
/etc/rc.d/rc.$cmd reload >/dev/null 2>&1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
lock=/tmp/atlock.tmp
|
||||
|
||||
logger -t network "update services: ${1:-1}s"
|
||||
rm -f $lock
|
||||
echo "sleep ${1:-1};/usr/local/emhttp/webGui/scripts/reload_services $lock"|at -M now 2>/dev/null
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user