X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=launch;h=618e1bcb980ab99dbc14edaff21019ef7613f23e;hb=8495a82088dba0b58662338b8ddef870894c9e34;hp=b769204e37371b932218050ca0a8069d7e4becb6;hpb=cf16a8a97327e008ccbd728b8c0eaf2e91c186c7;p=mpd-sima.git diff --git a/launch b/launch index b769204..618e1bc 100755 --- 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():