aports/main/ulogd/ulogd.initd
Jakub Jirutka 3a7055dada main/ulogd: improve init script, don't force supervise-daemon
Allow users to disable supervise-daemon or use another supervisor
via conf.d file.
2023-12-06 14:54:32 +00:00

31 lines
622 B
Bash

#!/sbin/openrc-run
description="Netfilter userspace logging daemon"
extra_started_commands="reload"
description_reload="Reload configuration"
command="/usr/sbin/ulogd"
# $ulogd_opts is only for backward compatibility (Alpine <3.19)
command_args="$ulogd_opts $command_args"
command_background="yes"
command_user="root:wheel"
pidfile="/run/$RC_SVCNAME.pid"
umask=027
required_files="/etc/ulogd.conf"
depend() {
before firewall
}
reload() {
ebegin "Reloading $RC_SVCNAME"
if [ "$supervisor" ]; then
$supervisor "$RC_SVCNAME" --signal HUP
else
start-stop-daemon --pidfile "$pidfile" --signal HUP
fi
eend $?
}