diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index 0423e66..c91140f 100644 --- a/couchpotato/core/_base/_core/main.py +++ b/couchpotato/core/_base/_core/main.py @@ -179,7 +179,7 @@ class Core(Plugin): if Env.get('daemonized'): return def signal_handler(signal, frame): - fireEvent('app.shutdown') + fireEvent('app.shutdown', single = True) signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) diff --git a/couchpotato/environment.py b/couchpotato/environment.py index d8c03c7..bd637ad 100644 --- a/couchpotato/environment.py +++ b/couchpotato/environment.py @@ -20,7 +20,7 @@ class Env(object): _options = None _args = None _quiet = False - _deamonize = False + _daemonized = False _desktop = None _session = None diff --git a/libs/daemon.py b/libs/daemon.py index 0e3d0d6..805cfa2 100644 --- a/libs/daemon.py +++ b/libs/daemon.py @@ -92,6 +92,7 @@ class Daemon(): """ Stop the daemon """ + # Get the pid from the pidfile try: pf = file(self.pidfile, 'r') @@ -115,7 +116,6 @@ class Daemon(): if err.find("No such process") > 0: self.delpid() else: - print str(err) sys.exit(1) def restart(self):