]> kaliko git repositories - mpd-sima.git/blobdiff - launch
typo and less verbose logging
[mpd-sima.git] / launch
diff --git a/launch b/launch
index b769204e37371b932218050ca0a8069d7e4becb6..618e1bcb980ab99dbc14edaff21019ef7613f23e 100755 (executable)
--- a/launch
+++ b/launch
@@ -66,7 +66,8 @@ def load_internal_plugins(sima):
 def main():
     """Entry point, deal w/ CLI and starts application
     """
-    info = dict({'version': core.__version__,})
+    info = dict({'version': core.__version__,
+                 'prog': 'sima'})
     # StartOpt gathers options from command line call (in StartOpt().options)
     sopt = StartOpt(info)
     # set logger
@@ -103,11 +104,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():