diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2014-03-11 14:52:08 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2014-03-11 14:52:28 +0000 |
commit | 6f4f306225501e795020085dc541522caf520b0c (patch) | |
tree | 079484b8a42646a68332de1e36925018685311f0 /testing/freeradius3/freeradius3.initd | |
parent | f8e89de0a10192799bed2c5de438dfce44fe1e8b (diff) | |
download | aports-6f4f306225501e795020085dc541522caf520b0c.tar.bz2 aports-6f4f306225501e795020085dc541522caf520b0c.tar.xz |
testing/freeradius3: new aport
Diffstat (limited to 'testing/freeradius3/freeradius3.initd')
-rw-r--r-- | testing/freeradius3/freeradius3.initd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/freeradius3/freeradius3.initd b/testing/freeradius3/freeradius3.initd new file mode 100644 index 000000000..251f34ff0 --- /dev/null +++ b/testing/freeradius3/freeradius3.initd @@ -0,0 +1,27 @@ +#!/sbin/runscript + +extra_started_commands="reload" +run_dir="/var/run/radiusd" +command="/usr/sbin/radiusd" +command_args="$RADIUSD_OPTS" +pidfile="$run_dir/radiusd.pid" +name="Freeradius" +conf="/etc/raddb/radiusd.conf" +user="$(grep -v '#' $conf | grep 'user =' | awk -F " = " '{ print $2 }')" +group="$(grep -v '#' $conf |grep 'group =' | awk -F " = " '{ print $2 }')" + +depend() { + need net + after firewall + use dns +} + +start_pre() { + checkpath --directory --owner ${user}:${group} --mode 0775 ${run_dir} +} + +reload () { + ebegin "Reloading $name" + kill -HUP `cat $pidfile` + eend $? +} |