mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-10 02:11:44 +01:00
If the quotes are not escaped, then the '-c' argument will not contain the whole message and the remaining words while just be assigned to the argv after the '-c' optarg.
40 lines
921 B
Bash
40 lines
921 B
Bash
#!/sbin/openrc-run
|
|
|
|
daemon=/usr/bin/sircbot
|
|
sircbot_user=${sircbot_user:-sircbot}
|
|
sircbot_group=${sircbot_group:-sircbot}
|
|
pidfile=/var/run/sircbot/sircbot.pid
|
|
|
|
depend() {
|
|
need net
|
|
after firewall
|
|
}
|
|
|
|
checkconfig() {
|
|
if [ -z "$sircbot_channels" ]; then
|
|
eerror "Please specify sircbot_channels in /etc/conf.d/sircbot"
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
start() {
|
|
checkconfig || return 1
|
|
checkpath --directory /var/run/sircbot --owner ${sircbot_user}
|
|
ebegin "Starting sircbot"
|
|
start-stop-daemon --start --user $sircbot_user --group $sircbot_group \
|
|
--umask 0002 --pidfile "$pidfile" \
|
|
--exec $daemon -- \
|
|
$sircbot_opts \
|
|
"${nickserv_pass:+-c \"nickserv :identify $nickserv_pass\"}" \
|
|
$sircbot_channels
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping sircbot"
|
|
start-stop-daemon --stop --pidfile "$pidfile" --exec $daemon
|
|
eend $?
|
|
}
|
|
|