rc script, pm - package manger and update init scripts
This commit is contained in:
1 parent
7c88b136ef
commit
31717c44b6
40 files changed
+569
-231
No files matched your search
+6
-14
@@ -3,29 +3,21 @@ Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting dnsd "
|
||||
notify "Starting dnsd "
|
||||
# sleep 10
|
||||
/usr/bin/dnsd -d -c /etc/dnsd.conf
|
||||
echo "nameserver 0.0.0.0" > /etc/resolv.conf
|
||||
if [[ "$?" == "0" ]]; then
|
||||
echo "nameserver 0.0.0.0" > /etc/resolv.conf
|
||||
echo $(pgrep dnsd) > /var/run/dnsd.pid
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
check $?
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping dnsd "
|
||||
notify "Stopping dnsd "
|
||||
kill $(cat /var/run/dnsd.pid) &> /dev/null
|
||||
rm /var/run/dnsd.pid
|
||||
if [[ "$?" == "0" ]]; then
|
||||
printf "[$Green OK $Color_off]\n"
|
||||
else
|
||||
printf "[$Red ERR $Color_off]\n"
|
||||
fi
|
||||
check $?
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
|
||||
Reference in new issue
Block a user