aboutsummaryrefslogtreecommitdiffstats
path: root/community/radsecproxy/radsecproxy.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/radsecproxy/radsecproxy.initd')
-rw-r--r--community/radsecproxy/radsecproxy.initd46
1 files changed, 46 insertions, 0 deletions
diff --git a/community/radsecproxy/radsecproxy.initd b/community/radsecproxy/radsecproxy.initd
new file mode 100644
index 00000000000..78a72e0fe00
--- /dev/null
+++ b/community/radsecproxy/radsecproxy.initd
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+
+name=radsecproxy
+description="Generic RADIUS proxy"
+description_checkconfig="Check configuration"
+description_reopen="Reopen log files and reload TLS certificate CRLs"
+
+extra_commands="checkconfig"
+extra_started_commands="reopen"
+
+: ${command_user:="radsecproxy:radsecproxy"}
+: ${cfgfile:="/etc/radsecproxy.conf"}
+
+command="/usr/sbin/radsecproxy"
+command_args="-c $cfgfile -f ${command_args:-}"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
+
+required_files="$cfgfile"
+
+depend() {
+ need net
+ use dns logger netmount
+}
+
+start_pre() {
+ $command $command_args -p
+}
+
+checkconfig() {
+ ebegin "Checking $name configuration"
+
+ start_pre
+ eend $?
+}
+
+reopen() {
+ ebegin "Reopening $name log files and CRLs"
+
+ if [ "$supervisor" ]; then
+ $supervisor "$RC_SVCNAME" --signal HUP
+ else
+ start-stop-daemon --signal HUP --pidfile "$pidfile"
+ fi
+ eend $?
+}