diff options
author | root <root@rshg054.dnsready.net> | 2013-04-19 01:05:57 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-04-19 01:05:57 -0700 |
commit | 1fedf1f5d5351aefd88268cba7353c79adac9b8a (patch) | |
tree | 513a073013b058d237750fe3214cd466cbeaf1b6 /extra/dnsmasq/rc.dnsmasq | |
parent | 55c3b92ede6a3b9eb17f254b338931f01a3ea5c6 (diff) |
Fri Apr 19 01:05:57 PDT 2013
Diffstat (limited to 'extra/dnsmasq/rc.dnsmasq')
-rwxr-xr-x | extra/dnsmasq/rc.dnsmasq | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/extra/dnsmasq/rc.dnsmasq b/extra/dnsmasq/rc.dnsmasq deleted file mode 100755 index 4030c2896..000000000 --- a/extra/dnsmasq/rc.dnsmasq +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/dnsmasq - -checkconfig() { - local testout - - if ! testout=$(/usr/bin/dnsmasq --test 2>&1); then - echo "$testout" - return 1 - fi - - return 0 -} - -pidfile=/run/dnsmasq.pid -if [[ -r $pidfile ]]; then - read -r PID < "$pidfile" - if [[ ! -d /proc/$PID ]]; then - # stale pidfile - unset PID - rm -f "$pidfile" - fi -fi - -case $1 in - start) - stat_busy "Starting DNS/DHCP daemon" - if [[ -z $PID ]] && checkconfig && - /usr/bin/dnsmasq "--user=${DNSMASQ_USER:-nobody}" \ - "--pid-file=$pidfile" \ - "${DNSMASQ_OPTS[@]}"; then - add_daemon dnsmasq - stat_done - else - stat_fail - fi - ;; - stop) - stat_busy "Stopping DNS/DHCP daemon" - if [[ $PID ]] && kill "$PID" &> /dev/null; then - # dnsmasq doesn't clean up after itself - rm -f "$pidfile" - rm_daemon dnsmasq - stat_done - else - stat_fail - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - checkconfig) - # diagnostics will be printed, with zero/non-zero exit - /usr/bin/dnsmasq --test - ;; - *) - echo "usage: $0 <start|stop|restart|checkconfig>" -esac - |