diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-02-07 18:54:13 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-02-09 19:11:02 +0200 |
commit | 5cf3781ad4beddfab5aa7181c0990a5462ffe06f (patch) | |
tree | a50a769bc8b6cc7e31f28466002c7dc15f2433b4 /ick_controller.py | |
parent | 4b6fd81e121935f60f29b8314bc7c44726bf6fd7 (diff) | |
download | ick2-5cf3781ad4beddfab5aa7181c0990a5462ffe06f.tar.gz |
Change: make all .service units be conditional on config
If the config file is missing, the unit won't start.
Diffstat (limited to 'ick_controller.py')
-rw-r--r-- | ick_controller.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ick_controller.py b/ick_controller.py index 85c0bca..a176351 100644 --- a/ick_controller.py +++ b/ick_controller.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -# Copyright (C) 2017 Lars Wirzenius +# Copyright (C) 2017-2018 Lars Wirzenius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -46,6 +46,7 @@ default_config = { 'token-issuer': None, 'log': [], 'statedir': None, + 'blob-service': None, } @@ -93,7 +94,10 @@ def main(): state.set_state_directory(config['statedir']) api = ick2.ControllerAPI(state) - ick2.log.log('info', msg_text='created ControllerAPI') + api.set_blob_service_url(config['blob-service']) + ick2.log.log( + 'info', msg_text='created ControllerAPI', + blob_service=config['blob-service']) application = apifw.create_bottle_application( api, counter, dict_logger, config) |