[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

shell startup script

Hi, i did it a small shell script to start one service at boot:

   case "$1" in
           echo "Starting Redmine"
           /etc/init.d/postgresql-8.3 start
           ruby /opt/redmine/script/server -e production &
           echo $! > /tmp/redmine.pid
           echo "Shutting down Redmine."
           kill -9 `cat /tmp/redmine.pid`
           rm /tmp/redmine.pid
           $0 stop
           $0 start
           echo "Usage: $0 {start|stop|restart}"
           exit 1
   exit 0

If i run the command to start the service and close my session, the program stops. How can i make the program ( ruby /opt/redmine/script/server -e production & ) to run even after i close my session? Tks in advance.

Leonardo Carneiro

Reply to: