4 daemon_command
="ruby-1.8 /var/lib/redmine/script/server webrick -d -e production"
10 pgrep
-u redmine
-f "${daemon_command}"
15 stat_busy
"Starting $daemon_name daemon"
18 if [ -z "$PID" ]; then
19 [ -f /var
/run
/$daemon_name.pid
] && rm -f /var
/run
/$daemon_name.pid
21 su
-s '/bin/sh' redmine
-c "${daemon_command} &>/dev/null"
27 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
28 add_daemon
$daemon_name
38 stat_busy
"Stopping $daemon_name daemon"
41 [ ! -z "$PID" ] && kill -INT $PID &> /dev
/null
47 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
48 rm_daemon
$daemon_name
60 stat_busy
"Checking $daemon_name status";
61 ck_status
$daemon_name
65 echo "usage: $0 {start|stop|restart|status}"