Line 6
Link Here
|
|
|
6 |
INSTANCE=${SVCNAME#*.} |
7 |
if [[ -n "${INSTANCE}" ]] && [[ "${INSTANCE}" != "mydns" ]]; then |
8 |
PIDFILE="/var/run/mydns.${INSTANCE}.pid" |
9 |
CONF="/etc/mydns.${INSTANCE}.conf" |
10 |
else |
11 |
PIDFILE="/var/run/mydns.pid" |
12 |
CONF="/etc/mydns.conf" |
13 |
fi |
Lines 12-13
Link Here
|
12 |
if [ ! -f /etc/mydns.conf ] ; then |
21 |
if [[ ! -f ${CONF} ]]; then |
13 |
eerror "No /etc/mydns.conf file exists!" |
22 |
eerror "No ${CONF} file exists!" |
14 |
-- |
|
|
Lines 15-16
Link Here
|
15 |
eerror "# /usr/sbin/mydns --dump-config > /etc/mydns.conf" |
24 |
eerror "# /usr/sbin/mydns --dump-config > ${CONF}" |
16 |
eerror "# chmod 0600 /etc/mydns.conf" |
25 |
eerror "# chmod 0600 ${CONF}" |
17 |
-- |
|
|
Line 22
Link Here
|
|
|
31 |
ebegin "Starting ${SVCNAME}" |
Lines 23-24
Link Here
|
23 |
ebegin "Starting mydns" |
34 |
start-stop-daemon --start --quiet --exec /usr/sbin/mydns \ |
24 |
start-stop-daemon --start --quiet --exec /usr/sbin/mydns -- -b |
35 |
--pidfile=${PIDFILE} -- --conf=${CONF} -b |
25 |
-- |
|
|
Lines 29-33
Link Here
|
29 |
ebegin "Stopping mydns" |
41 |
ebegin "Stopping ${SVCNAME}" |
30 |
PIDFILE=`cat /etc/mydns.conf | grep pidfile | awk '{ print $3 }'` |
|
|
31 |
if [ $PIDFILE == "" ]; then |
32 |
PIDFILE=/var/run/mydns.pid |
33 |
fi |
34 |
-- |