Added basic logging to OpenRC script.
This commit is contained in:
@@ -2,19 +2,26 @@
|
|||||||
|
|
||||||
NAME=gollum
|
NAME=gollum
|
||||||
PID=/var/run/${NAME}.pid
|
PID=/var/run/${NAME}.pid
|
||||||
|
EXEC=/usr/local/bin/gollum
|
||||||
|
LOG=/var/log/gollum.log
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
# Change log file to be owned by GOLLUM_USER
|
||||||
|
touch "${LOG}"
|
||||||
|
chown "${GOLLUM_USER}" "${LOG}"
|
||||||
|
|
||||||
ebegin "Starting Gollum"
|
ebegin "Starting Gollum"
|
||||||
start-stop-daemon --start \
|
start-stop-daemon --start \
|
||||||
--name "${NAME}" \
|
--name "${NAME}" \
|
||||||
--user "${GOLLUM_USER}" \
|
--user "${GOLLUM_USER}" \
|
||||||
--pidfile "${PID}" \
|
--pidfile "${PID}" \
|
||||||
--make-pidfile --background \
|
--make-pidfile --background \
|
||||||
--exec gollum -- $GOLLUM_OPTS "$GOLLUM_BASE"
|
--stderr "${LOG}" \
|
||||||
|
--exec "${EXEC}" -- $GOLLUM_OPTS "$GOLLUM_BASE"
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user