6 BUNDLE
="/opt/ruby-enterprise/bin/bundle"
7 PID_FILE
="$GITORIOUS_HOME/log/git-daemon.pid"
11 [ ! -f "$PIDFILE" ] && return 1
12 local PID
=$
(cat "$PIDFILE" 2> /dev
/null
)
13 [ -z "$PID" ] && return 1
14 if [ ! -d "/proc/$PID" ]; then
15 rm -f "$PIDFILE" 2> /dev
/null
23 if check_pid
"$PIDFILE"; then
24 local PID
=$
(cat "$PIDFILE" 2> /dev
/null
)
25 kill $PID &> /dev
/null
34 while check_pid
"$1"; do sleep 1; done
39 stat_busy
"Starting gitorious daemon"
40 check_pid
"$PID_FILE" || su
- git
-c "$BUNDLE exec script/git-daemon -d"
44 add_daemon gitorious-daemon
49 stat_busy
"Stopping gitorious daemon"
50 if ! kill_pid
"$PID_FILE"; then
53 rm_daemon gitorious-daemon
63 echo "usage: $0 {start|stop|restart}"