I am trying to run Google AppEngine on my Debian machine, I created a file init.d/gae:
. /lib/lsb/init-functions
#
# Initialize variables
#
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
# End scriptname
I am testing the script by manually invoking, and the script runs but not as a daemon or at least it doesn't detach from terminal. I am expecting/looking for similar functionality to Apache.
What switch am I missing?
EDIT
I should note that no PID file is being written or created despite the switch indicating it should be created