summaryrefslogtreecommitdiffstats
path: root/testing/freeradius3/freeradius3.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/freeradius3/freeradius3.initd')
-rw-r--r--testing/freeradius3/freeradius3.initd27
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 $?
+}