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="Freeradius 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
39 # and the watcher starts radiusd.
43 start-stop-daemon --start --quiet \
44 --pidfile $rundir/$NAME1.pid --exec $RADIUSD -- $ARGS
49 [ -z "$2" ] && echo -n "Stopping $DESC: "
52 [ -z "$2" ] && echo -n "radwatch "
53 start-stop-daemon --stop --quiet \
54 --pidfile $rundir/$NAME2.pid -- exec $RADWATCH
55 # but we have to stop radiusd manually.
56 killall radiusd 2>/dev/null
58 start-stop-daemon --stop --quiet \
59 --pidfile $rundir/$NAME1.pid --exec $RADIUSD
61 [ -z "$2" ] && echo "radiusd."
64 echo "Reloading $DESC configuration files."
65 start-stop-daemon --stop --signal 1 --quiet --pidfile \
66 $rundir/$NAME1.pid --exec $RADIUSD
69 sh /etc/init.d/radiusd stop quiet
71 /etc/init.d/radiusd start
74 echo "Usage: /etc/init.d/$NAME1 {start|stop|reload|restart}"