Hi Allan and everyone. Tks for your tips, but i have already done that.
The problem happens when i have the need to manually run the script,
like /etc/init.d/redmine start.
Allan Carvalho wrote:
Put your script on the /etc/init.d directory, so, run the update-rc.d
with the name of your script, this command will put the script at the
startup of the system.
Hugs,
Allan Carvalho
2010/4/12 Leonardo Carneiro - Veltrac <[email protected]>:
Hi, i did it a small shell script to start one service at boot:
#!/bin/bash
case "$1" in
start)
echo "Starting Redmine"
/etc/init.d/postgresql-8.3 start
ruby /opt/redmine/script/server -e production &
echo $! > /tmp/redmine.pid
;;
stop)
echo "Shutting down Redmine."
kill -9 `cat /tmp/redmine.pid`
rm /tmp/redmine.pid
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
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
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact
[email protected]
Archive: http://lists.debian.org/[email protected]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]