Files
guru/net-irc/pounce/files/pounce.initd-r1
Anna (cybertailor) Vyalkova 08b411e749 net-irc/pounce: update OpenRC service
* Run as a non-privileged user

* Use supervise-daemon instead of s-s-d

* Log to syslog

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2025-04-21 14:02:33 +05:00

34 lines
803 B
Plaintext

#!/sbin/openrc-run
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# shellcheck shell=sh
extra_started_commands="reload"
description="IRC bouncer"
description_reload="Refresh TLS keys"
supervisor="supervise-daemon"
command="/usr/bin/pounce"
command_args="${POUNCE_CONFIG:-/etc/pounce/pounce.conf}"
command_user="${POUNCE_USER:-pounce:pounce}"
pidfile="/run/pounce/${RC_SVCNAME}.pid"
output_logger="logger -p daemon.info -t pounce --"
error_logger="logger -p daemon.err -t pounce --"
depend() {
use dns logger
need net
}
start_pre() {
checkpath -d -o "${command_user}" /run/pounce
}
reload() {
ebegin "Refreshing ${RC_SVCNAME} keys"
start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}"
eend $? "Failed to reload ${RC_SVCNAME}"
}