diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:49:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:49:46 +0000 |
commit | 50b37d4a27d3295a29afca2286f1a5a086142cec (patch) | |
tree | 9212f763934ee090ef72d823f559f52ce387f268 /scripts/rc.radiusd.in | |
parent | Initial commit. (diff) | |
download | freeradius-upstream/3.2.1+dfsg.tar.xz freeradius-upstream/3.2.1+dfsg.zip |
Adding upstream version 3.2.1+dfsg.upstream/3.2.1+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/rc.radiusd.in')
-rwxr-xr-x | scripts/rc.radiusd.in | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/scripts/rc.radiusd.in b/scripts/rc.radiusd.in new file mode 100755 index 0000000..4cc04ab --- /dev/null +++ b/scripts/rc.radiusd.in @@ -0,0 +1,100 @@ +#!/bin/sh +# +# radiusd Start the radius daemon. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +# +# Copyright (C) 2001-2008 The FreeRADIUS Project http://www.freeradius.org + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +sbindir=@sbindir@ +localstatedir=@localstatedir@ +logdir=@logdir@ +rundir=${localstatedir}/run/radiusd +sysconfdir=@sysconfdir@ + +# +# If you have issues with OpenSSL, uncomment these next lines. +# +# Something similar may work for MySQL, and you may also +# have to LD_PRELOAD libz.so +# +#LD_LIBRARY_PATH=@OPENSSL_LIBS@ +#LD_RUN_PATH=@OPENSSL_LIBS@: +#LD_PRELOAD=@OPENSSL_LIBS@libcrypto.so +export LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD + +RADIUSD=$sbindir/radiusd +RADDBDIR=@raddbdir@ +DESC="FreeRADIUS" + +# +# See 'man radiusd' for details on command-line options. +# +ARGS="" + +test -f $RADIUSD || exit 0 +test -f $RADDBDIR/radiusd.conf || exit 0 + +#if [ ! -d $rundir ] ; then +# mkdir $rundir +# chown radmin:radius $rundir +# chmod 775 $rundir +#fi +# +#if [ ! -d $logdir ] ; then +# mkdir $logdir +# chown radmin:radius $logdir +# chmod 770 $logdir +# chmod g+s $logdir +#fi +# +#if [ ! -f $logdir/radius.log ]; then +# touch $logdir/radius.log +#fi +# +#chown radmin:radius $logdir/radius.log +#chmod 660 $logdir/radius.log + +case "$1" in + start) + echo -n "Starting $DESC:" + $RADIUSD $ARGS + echo "radiusd" + ;; + stop) + [ -z "$2" ] && echo -n "Stopping $DESC: " + [ -f $rundir/radiusd.pid ] && kill -TERM `cat $rundir/radiusd.pid` + [ -z "$2" ] && echo "radiusd." + ;; + reload|force-reload) + echo "Reloading $DESC configuration files." + [ -f $rundir/radiusd.pid ] && kill -HUP `cat $rundir/radiusd.pid` + ;; + restart) + sh $0 stop quiet + sleep 3 + sh $0 start + ;; + check) + $RADIUSD -C $ARGS + ;; + *) + echo "Usage: /etc/init.d/$RADIUS {start|stop|reload|restart|check}" + exit 1 +esac + +exit 0 |