Commit 6005d392 authored by Jakub Jirutka's avatar Jakub Jirutka 🇺🇦
Browse files

testing/radsecproxy: fix init script

radsecproxy doesn't even handle SIGUSR1 and SIGHUP doesn't reload
configuration.
parent 7ac743ad
# Maintainer: Josef Vybíhal <josef.vybihal@gmail.com>
pkgname=radsecproxy
pkgver=1.9.1
pkgrel=0
pkgrel=1
pkgdesc="Generic RADIUS proxy that supports both UDP and TLS (RadSec) RADIUS transports"
url="https://github.com/radsecproxy/radsecproxy"
license="BSD-3-Clause"
......@@ -44,6 +44,6 @@ package() {
sha512sums="
e72a3b55089cb985503c74a0aa0c62e0a05ac5325217900d39aa87563dd639f154ee372ac5e62ecd5aed92b832b0e58bc43f9588ed7950ec731fa5b297e5c07c radsecproxy-1.9.1.tar.gz
fb9b2761071f3773fe4c15ed74372333c0d7f39feb84eb48dbf8b531c85a5d4d3ae15fe8933f3f56c57bbf5047e9e08b652f0c44d7e974ec8d56909f3e308f30 radsecproxy.initd
e1e7b62fd92d7433430cbef5fcb99b0213f140c8aaa03f63ac2f432cead005e276c34ce2f8f6473b602e85160dc3cf8cb2e5209a6f026b740b4056208b40d073 radsecproxy.confd
aca6e90c5aa67ab6e46cbac463dc3a1874a785bb58576999fac3b6c378c6ea47db2289b1837c1ee14864297c272b8e1244db6cbb1efe974e8130403edac6d1b9 radsecproxy.initd
3c35805452b0fe47a5bd17b3cb129840deab2bfb81b2ebd283dc75f8847a01407a0a152f38bff16e55b06f4fb3819db82b24bf29bd2d95e72b0146f79733e427 radsecproxy.confd
"
# Configuration for /etc/init.d/radsecproxy
# Path of the main configuration file.
cfgfile="/etc/radsecproxy/radsecproxy.conf"
#cfgfile="/etc/radsecproxy/radsecproxy.conf"
# command to run
command=/usr/bin/radsecproxy
# Additional options for radsecproxy.
# Run `radsecproxy -h` to see valid options.
#command_args=
# radsecproxy arguments for $command
# can append -d as debug level (1-5)
command_args="-c $cfgfile"
# Uncomment to use process supervisor.
#supervisor="supervise-daemon"
#!/sbin/openrc-run
supervisor=supervise-daemon
description="generic RADIUS proxy"
name=radsecproxy
description="Generic RADIUS proxy"
description_checkconfig="Check configuration"
description_reload="Reload configuration"
description_reopen="Reopen log files"
description_reopen="Reopen log files and reload TLS certificate CRLs"
command_args_foreground="-f"
extra_commands="checkconfig"
extra_started_commands="reopen"
: ${cfgfile:="/etc/radsecproxy/radsecproxy.conf"}
command="/usr/bin/radsecproxy"
command_args="-c $cfgfile -f ${command_args:-}"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
required_files="$cfgfile"
......@@ -26,14 +33,13 @@ checkconfig() {
eend $?
}
reload() {
ebegin "Reloading $name configuration"
start_pre && supervise-daemon --signal HUP
eend $?
}
reopen() {
ebegin "Reopening $name log files"
supervise-daemon --signal USR1
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 $?
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment