diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /testing/hosts/alice/etc/init.d/radiusd | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'testing/hosts/alice/etc/init.d/radiusd')
-rwxr-xr-x | testing/hosts/alice/etc/init.d/radiusd | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/testing/hosts/alice/etc/init.d/radiusd b/testing/hosts/alice/etc/init.d/radiusd deleted file mode 100755 index 8334385f9..000000000 --- a/testing/hosts/alice/etc/init.d/radiusd +++ /dev/null @@ -1,64 +0,0 @@ -#!/sbin/runscript - -opts="${opts} reload" - -depend() { - need net - use dns -} - -checkconfig() { - # set the location of log files - if ! cd /var/log/radius ; then - eerror "Failed to change current directory to /var/log/radius" - return 1 - fi - - if [ ! -d /var/run/radiusd ] && ! mkdir /var/run/radiusd ; then - eerror "Failed to create /var/run/radiusd" - return 1 - fi - - if [ ! -f /etc/raddb/radiusd.conf ] ; then - eerror "No /etc/raddb/radiusd.conf file exists!" - return 1 - fi - - RADIUSD_OPTS="-xx" - RADIUSD_USER=`grep '^ *user *=' /etc/raddb/radiusd.conf | cut -d ' ' -f 3` - RADIUSD_GROUP=`grep '^ *group *=' /etc/raddb/radiusd.conf | cut -d ' ' -f 3` - if [ -n "${RADIUSD_USER}" ] && ! getent passwd ${RADIUSD_USER} > /dev/null ; then - eerror "${RADIUSD_USER} user missing!" - return 1 - fi - if [ -n "${RADIUSD_GROUP}" ] && ! getent group ${RADIUSD_GROUP} > /dev/null ; then - eerror "${RADIUSD_GROUP} group missing!" - return 1 - fi - - # radius.log is created before privileges are dropped - need to set proper permissions on it - [ -f radius.log ] || touch radius.log || return 1 - - chown -R "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" . /var/run/radiusd && \ - chmod -R u+rwX,g+rX . /var/run/radiusd || return 1 -} - -start() { - checkconfig || return 1 - - ebegin "Starting radiusd" - start-stop-daemon --start --quiet --exec /usr/sbin/radiusd -- ${RADIUSD_OPTS} >/dev/null - eend $? -} - -stop () { - ebegin "Stopping radiusd" - start-stop-daemon --stop --quiet --pidfile=/var/run/radiusd/radiusd.pid - eend $? -} - -reload () { - ebegin "Reloading radiusd" - kill -HUP `</var/run/radiusd/radiusd.pid` - eend $? -} |