I'm using a script like this...

---------------------------------------------------------------
#! /bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
pidfile=/var/run/tg.pid

. /lib/lsb/init-functions

case "$1" in
  start)
        log_begin_msg "Starting turbogears daemon..."
        /sbin/start-stop-daemon --retry 900 --chdir /myhome/release 
--exec /myhome/release/start.py prod.cfg --start --verbose --background 
--pidfile /var/run/tg.pid --make-pidfile
        log_end_msg $?
        ;;
  stop)
        log_begin_msg "Stopping turbogears daemon..."
        /sbin/start-stop-daemon --stop --quiet --pidfile /var/run/tg.pid
        log_end_msg $?
        ;;
  restart)
        log_begin_msg "Restarting turbogears daemon..."
        /sbin/start-stop-daemon --stop --retry 5 --quiet --pidfile 
/var/run/tg.pid
        /sbin/start-stop-daemon --retry 900 --chdir /myhome/release 
--exec /myhome/release/start.py prod.cfg --start --verbose --background 
--pidfile /var/run/tg.pid --make-pidfile
        log_end_msg $?
        ;;
  *)
        echo "Usage: /etc/init.d/turbogears {start|stop|restart}"
        exit 1
esac
exit 0
----------------------------------------------------------------


Sanjay ha scritto:
> Hi All,
>
> This might a novice question, but I am unable to find an answer.
> Normally I should start a turbogears application in a remote server
> like this:
>
> ./start-foo.py prod.cfg &
>
> Wondering what is a nice way to stop it. I tried seeing all processes
> using ps -A, and then killing the    process, by "kill n", n being the
> number of the process with name "start-foo.py". Then, while trying to
> start the application again, I got the error message
>
> raise cherrypy.NotReady("Port not free.")
>
> Needing suggestions. (Killing some python processes might do the
> trick, but how do I know which is the exact process?)
>
> thanks
> Sanjay
>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to