Sha256: 1e2b82c2a5c9651fd9fb1057b7d171b79dedcccd5be467fa893a69e9437028b8
Contents?: true
Size: 1.57 KB
Versions: 25
Compression:
Stored size: 1.57 KB
Contents
#!/bin/sh ### BEGIN INIT INFO # Provides: gollum # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop gollum wiki ### END INIT INFO # Distributed under the terms of the MIT License set -e # Edit these settings to your liking: GOLLUM_USER=gollum GOLLUM_BASE=/var/lib/gollum/.git GOLLUM_OPTS="--bare" NAME=gollum PID=/var/run/${NAME}.pid EXEC=/usr/local/bin/gollum LOG=/var/log/gollum.log . /lib/lsb/init-functions start () { # Change log file to be owned by GOLLUM_USER touch "${LOG}" chown "${GOLLUM_USER}" "${LOG}" log_daemon_msg "Starting Gollum" start-stop-daemon --start \ --name "${NAME}" \ --user "${GOLLUM_USER}" \ --chuid "${GOLLUM_USER}" \ --pidfile "${PID}" \ --make-pidfile --background \ --startas /bin/sh -- -c "exec ${EXEC} $GOLLUM_OPTS \"$GOLLUM_BASE\" > \"${LOG}\" 2>&1" log_end_msg $? } stop () { log_daemon_msg "Stopping Gollum" start-stop-daemon --stop \ --user "${GOLLUM_USER}" \ --signal INT \ --pidfile "${PID}" \ --retry 10 log_end_msg $? } status () { status_of_proc -p $PID $EXEC $NAME } case $1 in start) start ;; stop) stop ;; restart) stop start ;; status) status ;; *) log_success_msg "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac
Version data entries
25 entries across 25 versions & 2 rubygems