mirror of
https://github.com/ergochat/ergo.git
synced 2025-05-05 06:07:31 +02:00
Merge pull request #1920 from thesamesam/openrc-init
distrib: refine OpenRC init scripts
This commit is contained in:
commit
87d9addcfc
@ -1,2 +1,3 @@
|
|||||||
# /etc/conf.d/ergo: config file for /etc/init.d/ergo
|
# /etc/conf.d/ergo: config file for /etc/init.d/ergo
|
||||||
ERGO_CONFIGFILE="/etc/ergo/ircd.yaml"
|
ERGO_CONFIGFILE="/etc/ergo/ircd.yaml"
|
||||||
|
ERGO_USERNAME="ergo"
|
||||||
|
@ -1,17 +1,30 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
command=/usr/bin/ergo
|
name=${RC_SVCNAME}
|
||||||
command_args="run --conf ${ERGO_CONFIGFILE:-"/etc/ergo/ircd.yaml"}"
|
|
||||||
command_background=true
|
|
||||||
extra_started_commands="reload"
|
|
||||||
pidfile=/var/run/ergo.pid
|
|
||||||
name="ergo"
|
|
||||||
description="ergo IRC daemon"
|
description="ergo IRC daemon"
|
||||||
|
|
||||||
|
command=/usr/bin/ergo
|
||||||
|
command_args="run --conf ${ERGO_CONFIGFILE:-'/etc/ergo/ircd.yaml'}"
|
||||||
|
command_user=${ERGO_USERNAME:-ergo}
|
||||||
|
command_background=true
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
extra_started_commands="reload"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
use dns
|
use dns
|
||||||
provide ircd
|
provide ircd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath --owner ${command_user}:${command_user} --mode 0640 --file /var/log/${RC_SVCNAME}.out /var/log/${RC_SVCNAME}.err
|
||||||
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
ebegin "Reloading ${RC_SVCNAME}"
|
ebegin "Reloading ${RC_SVCNAME}"
|
||||||
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user