]> kaliko git repositories - mpd-sima.git/blobdiff - launch
Add daemon
[mpd-sima.git] / launch
diff --git a/launch b/launch
index b769204e37371b932218050ca0a8069d7e4becb6..13528b7559e769e1fa4929b6f1c7e7a339dcf082 100755 (executable)
--- a/launch
+++ b/launch
@@ -103,11 +103,16 @@ def main():
 
     #  Loading contrib plugins
     load_contrib_plugins(sima)
+
+    # Run as a daemon
+    if config.getboolean('daemon', 'daemon'):
+        sima.start()
+
     try:
-        sima.run()
+        sima.foreground()
     except KeyboardInterrupt:
         logger.info('Caught KeyboardInterrupt, stopping')
-        sima.shutdown()
+        #sima.shutdown()
 
 
 def run():