]>
git.ipfire.org Git - thirdparty/pdns.git/blob - contrib/powerdns.solaris.init.d
2 ################################################################################
3 # rc script for PowerDNS, Solaris-style | fernando@secret.org #
4 ################################################################################
8 BINARYPATH
=${exec_prefix}/bin
9 SBINARYPATH
=${exec_prefix}/sbin
14 suffix
=`/bin/basename $0 | /bin/awk -F- '{print $2}'`
18 EXTRAOPTS
=--config-name=$suffix
24 pdns_server
="$SBINARYPATH/pdns_server $EXTRAOPTS"
28 ret
=`$BINARYPATH/pdns_control $EXTRAOPTS $1 $2 2> /dev/null`
36 /bin
/echo "$PROGNAME: \c"
38 if test "$NOTRUNNING" = "0"
43 /bin
/echo "not running"
48 /bin
/echo "$PROGNAME: \c"
50 if test "$NOTRUNNING" = "0"
55 /bin
/echo "not running"
60 /bin
/echo "$PROGNAME: \c"
62 /bin
/pkill
-v -9 pdns_server
64 /bin
/echo "force-stopped"
68 /bin
/echo "$PROGNAME: \c"
70 if test "$NOTRUNNING" = "0"
72 /bin
/echo "already running"
74 $pdns_server --daemon --guardian=yes
82 force-reload | restart
)
83 /bin
/echo "$PROGNAME: \c"
85 /bin
/echo "stopping and waiting\c"
93 /bin
/echo "$PROGNAME: \c"
95 if test "$NOTRUNNING" = "0"
98 /bin
/echo requested reload
100 /bin
/echo not running yet
106 /bin
/echo "$PROGNAME: \c"
108 if test "$NOTRUNNING" = "0"
110 /bin
/echo "already running"
112 $pdns_server --daemon=no
--guardian=no
--control-console --loglevel=9
117 /bin
/echo "$PROGNAME: \c"
119 if test "$NOTRUNNING" = "0"
124 /bin
/echo "not running"
129 /bin
/echo "$PROGNAME: \c"
133 /bin
/echo Insufficient parameters
136 if test "$NOTRUNNING" = "0"
139 doPC show
$2 ; /bin
/echo $ret
141 /bin
/echo "not running"
148 /bin
/echo Insufficient parameters
151 if test "$NOTRUNNING" = "0"
153 doPC show
$2 ; /bin
/echo $ret
156 doPC show
$3 ; /bin
/echo $ret
160 doPC uptime
; /bin
/echo $ret
161 /bin
/echo PowerDNS daemon
163 /bin
/echo "not running"
171 /bin
/echo Insufficient parameters
174 if test "$NOTRUNNING" = "0"
176 doPC show
$2 ; /bin
/echo $ret
178 /bin
/echo "not running"
183 /bin
/echo "Usage: $0 { start | stop | force-reload | restart | status | dump | show | mrtg | cricket | monitor }"