mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-01 23:01:35 +01:00
The pounce initscript has been configured for creating multiple instances of pounce because a single instance of pounce can connect to only one IRC network. The calico initscript and conf.d file is needed if pounce creates UNIX domain sockets.
42 lines
981 B
Bash
42 lines
981 B
Bash
#!/sbin/openrc-run
|
|
|
|
description="A multi-client, TLS-only IRC bouncer"
|
|
|
|
: "${pounce_user:=pounce}"
|
|
: "${pounce_group:=pounce}"
|
|
: "${pounce_verbose:=false}"
|
|
: "${output_log:=/var/log/${RC_SVCNAME}.log}"
|
|
: "${error_log:=/var/log/${RC_SVCNAME}.log}"
|
|
|
|
instance_name="${RC_SVCNAME#*.}"
|
|
[ "$instance_name" != "pounce" ] \
|
|
&& name="pounce ($instance_name)" \
|
|
|| name="pounce"
|
|
|
|
command=/usr/bin/pounce
|
|
command_background="true"
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
command_user="${pounce_user}:${pounce_group}"
|
|
|
|
if yesno "${pounce_verbose}"; then
|
|
command_args="-v $pounce_config"
|
|
else
|
|
commmand_args="$pounce_config"
|
|
fi
|
|
|
|
depend() {
|
|
need localmount net
|
|
use dns
|
|
}
|
|
|
|
start_pre() {
|
|
[ -n "$output_log" ] && checkpath -q -f -m 0640 \
|
|
-o "$command_user" "$output_log"
|
|
|
|
[ -n "$error_log" ] && checkpath -q -f -m 0640 \
|
|
-o "$command_user" "$error_log"
|
|
|
|
[ -n "$pounce_config" ] && checkpath -q -f -m 0640 \
|
|
-o "$command_user" "$pounce_config"
|
|
}
|