redmine_mongrel.sh

Redmine start script - Paul zur Horst-Meyer, 2012-03-31 23:41

Download (782 Bytes)

 
1
#!/bin/sh
2
### BEGIN INIT INFO
3
# Provides:          redmine
4
# Required-Start:    $remote_fs $syslog
5
# Required-Stop:     $remote_fs $syslog
6
# Should-Start:      $network
7
# Should-Stop:       $network
8
# Default-Start:     2 3 4 5
9
# Default-Stop:      0 1 6
10
# Short-Description: Start redmine at boot time
11
### END INIT INFO
12

    
13
REDMINE_MONGREL_CONFIG=/etc/mongrel/redmine-cluster.yml
14
case "$1" in
15
	 start)
16
	   mongrel_rails cluster::start -C $REDMINE_MONGREL_CONFIG
17
	   RETVAL=$?
18
   ;;
19
	 stop)
20
	   mongrel_rails cluster::stop -C $REDMINE_MONGREL_CONFIG
21
	   RETVAL=$?
22
   ;;
23
	 restart)
24
	   mongrel_rails cluster::restart -C $REDMINE_MONGREL_CONFIG
25
	   RETVAL=$?
26
   ;;
27
	 *)
28
	   echo "Usage: redmine {start|stop|restart}"
29
	   RETVAL=1
30
   ;;
31
esac
32
exit $RETVAL