mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-23 23:48:22 +02:00
the new script uses supervise-daemon and standardized variables, as well as a fixed checkconfig that works across multiple instances Bug: https://bugs.gentoo.org/890338 Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev> Part-of: https://github.com/gentoo/gentoo/pull/41755 Closes: https://github.com/gentoo/gentoo/pull/41755 Signed-off-by: Sam James <sam@gentoo.org>
33 lines
672 B
Text
33 lines
672 B
Text
#!/sbin/openrc-run
|
|
# Copyright 1999-2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
: ${unrealircd_conf:=/etc/unrealircd/${RC_SVCNAME}.conf}
|
|
|
|
depend() {
|
|
use dns net
|
|
provide ircd
|
|
}
|
|
|
|
supervisor=supervise-daemon
|
|
command=/usr/bin/unrealircd
|
|
command_args="-F -f ${unrealircd_conf} ${unrealircd_opts}"
|
|
command_user="unrealircd:unrealircd"
|
|
|
|
extra_started_commands="checkconfig reload"
|
|
|
|
checkconfig() {
|
|
runuser -u "${command_user%%:*}" -- ${command} -c "${unrealircd_conf}"
|
|
}
|
|
|
|
start_pre() {
|
|
checkconfig
|
|
}
|
|
|
|
reload() {
|
|
checkconfig || return $?
|
|
|
|
ebegin "Reloading ${RC_SVCNAME}"
|
|
supervise-daemon "${RC_SVCNAME}" --signal HUP
|
|
eend $?
|
|
}
|