Added basic logging to OpenRC script.

This commit is contained in:
Curtis Vogt
2013-09-27 17:02:16 +00:00
parent 0b57e70c87
commit e01aa25be3
+8 -1
View File
@@ -2,19 +2,26 @@
NAME=gollum
PID=/var/run/${NAME}.pid
EXEC=/usr/local/bin/gollum
LOG=/var/log/gollum.log
depend() {
need net
}
start() {
# Change log file to be owned by GOLLUM_USER
touch "${LOG}"
chown "${GOLLUM_USER}" "${LOG}"
ebegin "Starting Gollum"
start-stop-daemon --start \
--name "${NAME}" \
--user "${GOLLUM_USER}" \
--pidfile "${PID}" \
--make-pidfile --background \
--exec gollum -- $GOLLUM_OPTS "$GOLLUM_BASE"
--stderr "${LOG}" \
--exec "${EXEC}" -- $GOLLUM_OPTS "$GOLLUM_BASE"
eend $?
}