Edgewall Software

Changes between Initial Version and Version 1 of Bitten Slave Daemon Ubuntu


Ignore:
Timestamp:
Oct 19, 2009, 5:49:11 PM (15 years ago)
Author:
marcosdsanchez
Comment:

added ubuntu script

Legend:

Unmodified
Added
Removed
Modified
  • Bitten Slave Daemon Ubuntu

    v1 v1  
     1Here is a simple script to start bitten-slave as a daemon. This will usually be put in /etc/init.d or wherever your init scripts are kept. This has been tested on Ubuntu Hardy, however should run from any system with only minimal changes. You will need to change the DAEMON_ARG varible to contain a URL which reflects your server.
     2
     3
     4{{{
     5#! /bin/sh
     6### BEGIN INIT INFO
     7# Provides:          bitten-slave
     8# required-start:     $all
     9# required-stop:     $all
     10# Default-Start:     2 3 4 5
     11# Default-Stop:      0 1 6
     12# Short-Description: starts trac's bitten-slave
     13# Description:       starts trac's bitten-slave using start-stop-daemon
     14### END INIT INFO
     15
     16NAME="bitten-slave"
     17DAEMON_CMD="/usr/bin/bitten-slave"
     18DAEMON_ARG="http://localhost/staff/trac/sistema/builds -i 15 -umarcos -pmpbe897"
     19
     20test -x $DAEMON_CMD || exit 0
     21
     22set -e
     23
     24case "$1" in
     25  start)
     26    echo -n "Arrancando bitten-slave"
     27    start-stop-daemon --start -m --quiet --background --pidfile /var/run/bitten-slave.pid --exec $DAEMON_CMD -- $DAEMON_ARG
     28    ;;
     29  stop)
     30    echo -n "Parando bitten-slave"
     31    start-stop-daemon --stop --quiet --pidfile /var/run/bitten-slave.pid --oknodo
     32    ;;
     33  *)   
     34    N=/etc/init.d/$NAME
     35    echo "Uso: $N {start|stop}" >&2
     36    exit 1   
     37    ;;
     38esac
     39
     40exit 0
     41}}}