I registered the init.d script and when I invoke this directly /etc/init.d/gae it appears to work...PID file is created but the process is no where to be seen by the time I do a ps
I have googled and best determined it is possibly a path issue, with "python" not being located properly? If I remove the "quotes" around prog variable Google AppEngine runs as expected and stays running, but it also won't detach from terminal...any ideas?
name=gae
user=$name
pid=/var/run/$name.pid
prog="python /opt/google_appengine/dev_appserver.py --host=0.0.0.0 --admin_host=0.0.0.0 --php_executable_path=/usr/bin/php-cgi /var/www"
case "${1}" in
start)
echo "Starting...Google App Engine"
start-stop-daemon --start --make-pidfile --background --oknodo --user "$user" --name "$name" --pidfile "$pid" --startas "$prog"
;;
stop)
echo "Stopping...Google App Engine"
;;
restart)
${0} stop
sleep 1
${0} start
;;
*)
echo "Usage: ${0} {start|stop|restart}"
exit 1
;;
esac
exit 0