I am trying to write a startup script that executes an application (MapProxy) after a server reboot. My server runs Ubuntu 11.04 Natty 64 bit.
In the script, I execute a python script
exec python /$path/"config.py" & which successfully creates a fcgi.socket that the web server can communicate with. However, I need to make fcgi.socket writeable or MapProxy will not work i.e. I need to action a chmod on it.
It seems that after I action the config.py, I lose control within the startup script - it does not go on to make the fcgi.socket writable. Any ideas?
#! /bin/bash : exec python /$path/"config.py" & exec chmod o+w /$path/"fcgi.socket" & exit 0