wok view freeradius/stuff/freeradius @ rev 22279

updated xorg-xf86-video-s3virge (1.10.6 -> 1.11.0)
author Hans-G?nter Theisgen
date Wed Nov 13 14:17:52 2019 +0100 (2019-11-13)
parents
children
line source
1 #!/bin/sh
2 # /etc/init.d/freeradius : Start, stop and restart freeradius server on SliTaz, at
3 # boot time or with the command line.
4 #
5 # To start freeradius server at boot time, just put freeradius in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=freeradius
12 DESC="freeradius server"
13 DAEMON=/usr/sbin/radiusd
14 OPTIONS=$FREERADIUS_OPTIONS
15 PIDFILE=/var/run/radiusd/radiusd.pid
16 [ -n "$OPTIONS" ] || OPTIONS="-d /etc/raddb -i 0.0.0.0 -p 1812"
18 case "$1" in
19 start)
20 if active_pidfile $PIDFILE radiusd ; then
21 echo "$NAME already running."
22 exit 1
23 fi
24 echo -n "Starting $DESC: $NAME... "
25 $DAEMON $OPTIONS
26 status
27 ;;
28 stop)
29 if ! active_pidfile $PIDFILE radiusd ; then
30 echo "$NAME is not running."
31 exit 1
32 fi
33 echo -n "Stopping $DESC: $NAME... "
34 kill $(cat $PIDFILE)
35 status
36 ;;
37 restart)
38 if ! active_pidfile $PIDFILE radiusd ; then
39 echo "$NAME is not running."
40 exit 1
41 fi
42 echo -n "Restarting $DESC: $NAME... "
43 kill $(cat $PIDFILE)
44 sleep 2
45 $DAEMON $OPTIONS
46 status
47 ;;
48 *)
49 echo ""
50 echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]"
51 echo ""
52 exit 1
53 ;;
54 esac
56 exit 0