diff --git a/daemon.py b/daemon.py index 7ca7860..e95bbe6 100755 --- a/daemon.py +++ b/daemon.py @@ -22,7 +22,11 @@ def run(): conn.close() # fork en arrière plan + pidfile + if __name__ == "__main__": + if '-fg' in sys.argv: + run() + exit() # do the UNIX double-fork magic, see Stevens' "Advanced # Programming in the UNIX Environment" for details (ISBN 0201563177) try: