#!/sbin/openrc-run
supervisor=supervise-daemon
name="soju"
description="User-friendly IRC bouncer"
command=/usr/bin/soju
command_user=soju:soju
directory="/var/lib/$RC_SVCNAME"
extra_started_commands="reload"
description_reload="Reload TLS certificate"
depend() {
need net localmount
after firewall
}
start_pre() {
checkpath --directory --owner $command_user --mode 0775 "$directory"
[ -n "$error_log" ] && checkpath -f -o $command_user "$error_log"
}
reload() {
ebegin "Reloading TLS certificate"
$supervisor $RC_SVCNAME --signal HUP
eend $?
}