mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 21:43:03 -04:00
* 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>
34 lines
803 B
Plaintext
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}"
|
|
}
|