Quick question,
I’m starting a linux daemon (motion) from a webpage using a python script inside Django. When I use the following:
def restartRecord():
#restart the service
config_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'recorder/config/motion.conf')
p = subprocess.call(['motion', '-c', config_file])
return True
It starts the daemon no problem, but it also ties up the port if I’m using running it from the django development server (port 8000). Is this the normal behaviour? – Why would starting the daemon tie up that port? I can test this by stopping the development server and trying to start it again.
Is there a better way to start this service?
Cheers,
Ben
It seems to work fine under apache which is the main thing. Thanks for the replies.