summaryrefslogtreecommitdiff
path: root/net-irc/pounce/files/pounce.initd-r1
blob: ea81c207b5bdeb1b99b87b312f606a0ca7c5bbe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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}"
}