Prepare contrib directory

Move openrc files to contrib/ in conjunction with systemd service.
Update gemspec to bundle contrib/ into the gem.
This commit is contained in:
tuftedocelot
2014-11-06 14:20:33 -06:00
parent adf544dca9
commit 439aa6e4f5
3 changed files with 3 additions and 2 deletions
+3
View File
@@ -0,0 +1,3 @@
GOLLUM_USER=gollum
GOLLUM_BASE=/home/gollum/wiki
GOLLUM_OPTS="--config /home/gollum/config.rb"
+36
View File
@@ -0,0 +1,36 @@
#!/sbin/runscript
# Distributed under the terms of the MIT License
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 \
--stderr "${LOG}" \
--exec "${EXEC}" -- $GOLLUM_OPTS "$GOLLUM_BASE"
eend $?
}
stop() {
ebegin "Stopping Gollum"
start-stop-daemon --stop \
--name "${NAME}" \
--user "${GOLLUM_USER}" \
--pidfile "${PID}"
eend $?
}