diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-11-10 16:25:20 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-11-10 16:25:20 +0200 |
commit | 056ef0f2c90d57675b18ebe768e9b2424dd9e941 (patch) | |
tree | cdd33e01db6c0dfa675bb275d8045cb3a29d59cc | |
parent | 44700fb06a45af7e947d27c4338034379f4a4d49 (diff) | |
download | muck-poc-056ef0f2c90d57675b18ebe768e9b2424dd9e941.tar.gz |
Change: make pid config setting optional
-rw-r--r-- | debian/postinst | 1 | ||||
-rwxr-xr-x | muck_poc | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/debian/postinst b/debian/postinst index 743d528..ac623a9 100644 --- a/debian/postinst +++ b/debian/postinst @@ -37,5 +37,6 @@ create_user _muck /var/lib/ick /var/log/muck # Create store dir install -d -m 0755 -o _muck -g _muck /var/lib/muck +install -d -m 0755 -o _muck -g _muck /var/lib/muck/store #DEBHELPER# @@ -214,9 +214,10 @@ logging.info('Muck starts') signing_key_text = open(config['signing-key-filename']).read() store = muck.Store(config['store']) -pid = os.getpid() -with open(config['pid'], 'w') as f: - f.write(str(pid)) +if config.get('pid'): + pid = os.getpid() + with open(config['pid'], 'w') as f: + f.write(str(pid)) app = bottle.default_app() api = MuckAPI(app, store, signing_key_text) |