Files
webgui/emhttp/plugins/dynamix/scripts/reload_services
T
2023-10-02 22:16:23 +02:00

14 lines
300 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
for cmd in $SERVICES; do
if /etc/rc.d/rc.$cmd update; then
logger -t network -- "reload service: $cmd"
/etc/rc.d/rc.$cmd reload >/dev/null 2>&1
fi
done
exit 0