InitScript: Difference between revisions
Jump to navigation
Jump to search
(Ident for code formatting) |
No edit summary |
||
Line 1: | Line 1: | ||
#!/bin/sh | #!/bin/sh | ||
RTPATH=/path/to/rt RTUSER=rt FCGI_SOCKET_PATH=$RTPATH/var/appSocket | RTPATH=/path/to/rt RTUSER=rt FCGI_SOCKET_PATH=$RTPATH/var/appSocket | ||
case $1 in | case $1 in | ||
start) | start) |
Revision as of 09:06, 22 August 2011
#!/bin/sh RTPATH=/path/to/rt RTUSER=rt FCGI_SOCKET_PATH=$RTPATH/var/appSocket case $1 in start) echo -n "Starting RT: mason_handler.fcgi" cd $RTPATH export FCGI_SOCKET_PATH su $RTUSER -c perl bin/mason_handler.fcgi & echo ;; stop) echo -n "Stopping RT: " PIDS=`ps axww | awk '/[m]ason_handler.fcgi/ { print $1}'` if [ -n "$PIDS" ] then echo -n kill -TERM $PIDS kill $PIDS echo else echo RT not running fi ;; restart|force-reload) $0 stop $0 start ;; *) echo "Usage: /etc/init.d/rt { stop | start | restart }" exit 1 ;; esac