3
# Required-Start: $local_fs $remote_fs $network
5
# Default-Stop: 0 1 2 6
6
# Short-Description: Loggerhead
7
# Description: Manage Loggerhead (a web viewer for projects in bazaar)
10
# Configure this please: #
11
LOGGERHEAD_PATH=/opt/loggerhead
12
LOG_FOLDER=/var/log/loggerhead
13
LOG_FILE=$LOG_FOLDER/loggerheadd.log
17
# You can add additional options to serve-branches here:
18
START_CMD="$LOGGERHEAD_PATH/serve-branches --prefix=$PREFIX --log-folder=$LOG_FOLDER --port=$PORT /var/lib/gforge/bzrroot/"
25
python $START_CMD > $LOG_FILE 2>&1 &
26
echo "Started loggerhead. (See $LOG_FOLDER for details.)"
32
proccess=`pgrep -fl "$START_CMD"`
34
netstat -anp |grep -e ":$PORT"
35
if [ -z "$proccess" ]; then
36
echo "Loggerhead is not running."
39
python $START_CMD > $LOG_FILE 2>&1 &
40
echo "Restarted loggerhead. (See $LOG_FOLDER for details.)"
43
echo "Loggerhead is running."
47
echo "Usage: loggerheadd { start | stop | status | restart }"