superwise the service
This commit is contained in:
parent
68155d652a
commit
e88a26ceae
@ -1,19 +1,15 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
command_args="irc.rizon.net:6665 #/g/test"
|
command_args="irc.rizon.net:6665 \#/g/test"
|
||||||
|
|
||||||
name="hibot"
|
name="hibot"
|
||||||
command="syscmd(`printf $(pwd)')/${name}"
|
|
||||||
pidfile="/var/run/${name}.pid"
|
pidfile="/var/run/${name}.pid"
|
||||||
|
supervisor="supervise-daemon"
|
||||||
|
|
||||||
start() {
|
command="syscmd(`printf $(pwd)')/${name}"
|
||||||
ebegin "Starting $name"
|
|
||||||
start-stop-daemon --start --background --make-pidfile --pidfile "$pidfile" --exec "$command" -- $command_args
|
reload() {
|
||||||
eend $?
|
ebegin "Reloading ${RC_SVCNAME}"
|
||||||
}
|
${supervisor} ${name} --pidfile "${pidfile}" -- ${command_args}
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping $name"
|
|
||||||
start-stop-daemon --stop --pidfile "$pidfile"
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user