SiriServerCore
SiriServerCore copied to clipboard
daemon option
are there any plans to implement a daemon option so one can run the server easy in backround mode?
atm i'm useing screen to do this, but i think a daemon is more comfortable and may be more secure?
im not verry advanced in python but may this is usefull: http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/
basicly it forks the process and runs it in the background, logging should be automaticly "redirected" to file output (maybe SiriServer.log in main dir?)
I usually just run the server in a screen.
screen -R SiriServer
python SiriServer.py
[PRESS CTRL+A+D]
you can reattach using
screen -R SiriServer
or list all screens
screen -ls
logging can already be redirected into a logfile, see --help
I'm currently not planing on creating a daemon
like i said, i already run it in screen... just wanted to ask if u have plans to implement a daemon in the future ;)
ok i played around a little bit, seems like ive got it working...
this is what i got so far: https://gist.github.com/2022356
if no logfile is given "SiriServer.log" is taken by default, also the pid is written to SiriServer.pid
EDIT: also added a kill option to kill the daemon if its running