first
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#!/sbin/openrc-run
|
||||
DIRECTORY=/opt/iglook
|
||||
PIDFILE=/var/run/iglook.pid
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start(){
|
||||
ebegin "start iglook"
|
||||
start-stop-daemon \
|
||||
--start \
|
||||
-d "${DIRECTORY}" \
|
||||
-1 /var/log/iglook.log \
|
||||
-2 /var/log/iglook.err \
|
||||
-m --pidfile ${PIDFILE} \
|
||||
--background \
|
||||
--exec /usr/bin/node -- index.js
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop(){
|
||||
ebegin "stop iglook"
|
||||
start-stop-daemon \
|
||||
--stop \
|
||||
--pidfile ${PIDFILE} \
|
||||
-d "${DIRECTORY}" \
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload(){
|
||||
ebegin "restart iglook"
|
||||
kill -HUP ${PIDFILE}
|
||||
start
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user