31 lines
657 B
Plaintext
Executable File
31 lines
657 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="microIRC daemon"
|
|
supervisor=supervise-daemon
|
|
command="/usr/local/bin/uircd"
|
|
command_args=""
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
command_background=true
|
|
uircd_logpath="${uircd_logpath:-/home/${command_user}/IRC}"
|
|
|
|
depend() {
|
|
need networking
|
|
want stunnel.irc
|
|
}
|
|
|
|
optional_arg() {
|
|
if [ -n "$2" ]; then
|
|
command_args="$command_args $1 '$2'"
|
|
fi
|
|
}
|
|
|
|
start_pre() {
|
|
optional_arg "-V" "$uircd_verbosity"
|
|
checkpath --directory --owner $command_user "$uircd_logpath"
|
|
command_args="$command_args -l '$uircd_logpath'"
|
|
optional_arg "-m" "$uircd_quitmsg"
|
|
for i in $uircd_connections; do
|
|
command_args="$command_args -c '$i'"
|
|
done
|
|
}
|