aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns_balance/files/dns_balance.sh
blob: 49c7fff46472b077a07bcc4a08e9b057e68c566a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# $FreeBSD$

dns_balance="!!PREFIX!!/sbin/dns_balance"
pidfile="/var/run/dns_balance.pid"
logfile="/var/log/dns_balance.log"
#listen="-i 192.168.0.1"

case "$1" in
start)
    if [ -x $dns_balance ]; then
        echo -n ' dns_balance'
        $dns_balance -l $logfile -p $pidfile $listen
    fi
    ;;
stop)
    if [ -f $pidfile ]; then
        kill `cat $pidfile` && echo -n ' dns_balance'
    else
        echo ' dns_balance: not running'
    fi
    ;;
*)
    echo "Usage: `basename $0` {start|stop}" >&2
    exit 64
    ;;
esac

exit 0