3 # radiusd Start the radius daemon.
5 # This is a script suitable for the Debian Linux distribution.
6 # Copy it to /etc/init.d/radiusd, make it executable, and
7 # execute "update-rc.d radiusd defaults 50".
11 exec_prefix = @exec_prefix@
13 localstatedir = @localstatedir@
15 rundir = ${localstatedir}/run
17 RADIUSD=$sbindir/radiusd
18 WATCHER=$sbindir/radwatch
19 DESC="Cistron radius server"
25 test -f $RADIUSD || exit 0
29 if [ ! -f $logdir/radutmp ]
33 echo -n "Starting $DESC: "
37 start-stop-daemon --start --quiet --startas $WATCHER \
38 --pidfile $rundir/$NAME2.pid --exec $RADIUSD -- $ARGS
40 start-stop-daemon --start --quiet \
41 --pidfile $rundir/$NAME1.pid --exec $RADIUSD -- $ARGS
46 [ -z "$2" ] && echo -n "Stopping $DESC: "
49 [ -z "$2" ] && echo -n "radwatch "
50 start-stop-daemon --stop --quiet \
51 --pidfile $rundir/$NAME2.pid -- exec $RADWATCH
52 #killall -9 radwatch 2>/dev/null
54 start-stop-daemon --stop --quiet \
55 --pidfile $rundir/$NAME1.pid --exec $RADIUSD
57 #killall radiusd 2>/dev/null
58 [ -z "$2" ] && echo "radiusd."
61 echo "Reloading $DESC configuration files."
62 start-stop-daemon --stop --signal 1 --quiet --pidfile \
63 $rundir/$NAME1.pid --exec $RADIUSD
66 sh /etc/init.d/radiusd stop quiet
68 /etc/init.d/radiusd start
71 echo "Usage: /etc/init.d/$NAME1 {start|stop|reload|restart}"