monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: Debian init scripts for monotone


From: Henry Nestler
Subject: [Monotone-devel] Re: Debian init scripts for monotone
Date: Thu, 31 Mar 2005 11:22:29 +0200
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

Matthew A. Nicholson wrote:

/etc/init.d/monotone start

Only two files as sample, how start monotone in SuSE 9.0.
Perhaps for document in source or docs for other users?

Henry
#! /bin/sh
#
# Author: hne
#
# /etc/init.d/monotone
#
### BEGIN INIT INFO
# Provides:       monotone
# Required-Start: $network $remote_fs $syslog
# Required-Stop:
# Default-Start:  3 5
# Default-Stop:   
# Description:    monotone server
### END INIT INFO

. /etc/rc.status
. /etc/monotone/server.cfg

rc_reset
case "$1" in
    start)
        echo -n "Starting Monotone: "
        startproc -l $MT_LOGFILE $MONOTONE_BIN $MONOTONE_ARGS
        rc_status -v
      ;;
    stop)
        echo -n "Shutting down Monotone: "
        ## Stop daemon with killproc(8) and if this fails
        ## set echo the echo return value.

        killproc -TERM $MONOTONE_BIN

        # Remember status and be verbose
        rc_status -v
      ;;
    status)
        echo -n "Checking for Monotone: "
        checkproc $MONOTONE_BIN
        rc_status -v
      ;;
    restart)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;
esac
rc_exit
# file: /etc/monotone/server.cfg
# Configuration for Monotone Server

# Data Base file
DB="/var/data/mt-server.db"

# IP-Adress for server
TCPIP="192.168.0.4"

# Branches
COLLECTION="ssv"

# Path for all Server config files
MT_ETC=/etc/monotone

# Some outputs from monotone
MT_LOGFILE="/var/log/monotone.log"

# Option for Debug
#DEBUG=--debug --quiet

MONOTONE_BIN="/usr/bin/monotone"
MONOTONE_ARGS="--db=$DB --norc $DEBUG \
         --dump=/var/log/mt-dump.log \
         --rcfile=$MT_ETC/serv_anonymous.lua \
         --rcfile=$MT_ETC/serv_passwd.lua \
         --rcfile=$MT_ETC/serv_users.lua \
         serve $TCPIP $COLLECTION"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]