|
@@ -1,17 +1,30 @@
|
1
|
1
|
#!/sbin/openrc-run
|
|
2
|
+name=${RC_SVCNAME}
|
|
3
|
+description="ergo IRC daemon"
|
|
4
|
+
|
2
|
5
|
command=/usr/bin/ergo
|
3
|
|
-command_args="run --conf ${ERGO_CONFIGFILE:-"/etc/ergo/ircd.yaml"}"
|
|
6
|
+command_args="run --conf ${ERGO_CONFIGFILE:-'/etc/ergo/ircd.yaml'}"
|
|
7
|
+command_user=${ERGO_USERNAME:-ergo}
|
4
|
8
|
command_background=true
|
|
9
|
+
|
|
10
|
+pidfile=/var/run/${RC_SVCNAME}.pid
|
|
11
|
+
|
|
12
|
+output_log="/var/log/${RC_SVCNAME}.out"
|
|
13
|
+error_log="/var/log/${RC_SVCNAME}.err"
|
|
14
|
+# --wait: to wait 1 second after launching to see if it survived startup
|
|
15
|
+start_stop_daemon_args="--wait 1000"
|
|
16
|
+
|
5
|
17
|
extra_started_commands="reload"
|
6
|
|
-pidfile=/var/run/ergo.pid
|
7
|
|
-name="ergo"
|
8
|
|
-description="ergo IRC daemon"
|
9
|
18
|
|
10
|
19
|
depend() {
|
11
|
20
|
use dns
|
12
|
21
|
provide ircd
|
13
|
22
|
}
|
14
|
23
|
|
|
24
|
+start_pre() {
|
|
25
|
+ checkpath --owner ${command_user}:${command_user} --mode 0640 --file /var/log/${RC_SVCNAME}.out /var/log/${RC_SVCNAME}.err
|
|
26
|
+}
|
|
27
|
+
|
15
|
28
|
reload() {
|
16
|
29
|
ebegin "Reloading ${RC_SVCNAME}"
|
17
|
30
|
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|