Files
webgui/emhttp/plugins/dynamix/scripts/reload_services
2023-10-03 10:21:19 +02:00

18 lines
313 B
Bash
Executable File

#!/bin/bash
SERVICES="rpc nfsd ntpd nginx sshd avahidaemon samba"
if [[ -n $1 ]]; then
[[ ! -e $1 ]] && touch $1 || exit 0
fi
# run & log functions
. /etc/rc.d/rc.runlog
for cmd in $SERVICES; do
if /etc/rc.d/rc.$cmd update; then
log "$cmd"
/etc/rc.d/rc.$cmd reload >/dev/null 2>&1
fi
done
exit 0