aports/testing/pgqd/pgqd.initd
2026-01-28 14:54:39 +01:00

32 lines
564 B
Bash

#!/sbin/openrc-run
extra_started_commands="reload"
description="PgQ maintenance daemon"
description_reload="Reload the configuration"
: ${command_user:="postgres"}
: ${cfgfile:="/etc/pgqd.ini"}
command="/usr/bin/pgqd"
command_args="$command_args $cfgfile"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
depend() {
use logger
after postgresql
}
reload() {
ebegin "Reloading $RC_SVCNAME configuration"
if [ "$supervisor" ]; then
$supervisor "$RC_SVCNAME" --signal HUP
else
start-stop-daemon --pidfile "$pidfile" --signal HUP
fi
eend $?
}