37 lines
543 B
Plaintext
37 lines
543 B
Plaintext
|
#!/sbin/openrc-run
|
||
|
DIRECTORY=/opt/fblook
|
||
|
PIDFILE=/var/run/fblook.pid
|
||
|
|
||
|
depend(){
|
||
|
need net
|
||
|
}
|
||
|
|
||
|
start(){
|
||
|
ebegin "Starting fblook"
|
||
|
start-stop-daemon \
|
||
|
--start \
|
||
|
-d "${DIRECTORY}" \
|
||
|
-1 /var/log/fblook.log \
|
||
|
-2 /var/log/fblook.err \
|
||
|
-m --pidfile ${PIDFILE} \
|
||
|
--background \
|
||
|
--exec /usr/bin/node -- index.js
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
stop(){
|
||
|
ebegin "Stopping fblook"
|
||
|
start-stop-daemon \
|
||
|
--stop \
|
||
|
--pidfile ${PIDFILE} \
|
||
|
-d "${DIRECTORY}"
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
reload() {
|
||
|
ebegin "Restarting (HUP) fblook"
|
||
|
kill -HUP ${PIDFILE}
|
||
|
start
|
||
|
eend $?
|
||
|
}
|