2022-01-09 08:36:02 +01:00
|
|
|
#!/sbin/openrc-run
|
2022-02-19 23:39:39 +01:00
|
|
|
name=${RC_SVCNAME}
|
|
|
|
description="ergo IRC daemon"
|
|
|
|
|
2022-01-09 08:36:02 +01:00
|
|
|
command=/usr/bin/ergo
|
2022-02-19 23:39:39 +01:00
|
|
|
command_args="run --conf ${ERGO_CONFIGFILE:-'/etc/ergo/ircd.yaml'}"
|
|
|
|
command_user=${ERGO_USERNAME:-ergo}
|
2022-01-09 08:36:02 +01:00
|
|
|
command_background=true
|
2022-02-19 23:39:39 +01:00
|
|
|
|
|
|
|
pidfile=/var/run/${RC_SVCNAME}.pid
|
|
|
|
|
|
|
|
output_log="/var/log/${RC_SVCNAME}.out"
|
|
|
|
error_log="/var/log/${RC_SVCNAME}.err"
|
|
|
|
# --wait: to wait 1 second after launching to see if it survived startup
|
|
|
|
start_stop_daemon_args="--wait 1000"
|
|
|
|
|
2022-01-09 08:36:02 +01:00
|
|
|
extra_started_commands="reload"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
use dns
|
|
|
|
provide ircd
|
|
|
|
}
|
|
|
|
|
2022-02-19 23:39:39 +01:00
|
|
|
start_pre() {
|
|
|
|
checkpath --owner ${command_user}:${command_user} --mode 0640 --file /var/log/${RC_SVCNAME}.out /var/log/${RC_SVCNAME}.err
|
|
|
|
}
|
|
|
|
|
2022-01-09 08:36:02 +01:00
|
|
|
reload() {
|
|
|
|
ebegin "Reloading ${RC_SVCNAME}"
|
|
|
|
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
|
|
|
eend $?
|
|
|
|
}
|