Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Merge 3268f2b into 0ab8ad8
Browse files Browse the repository at this point in the history
  • Loading branch information
slinksoft committed Jul 25, 2020
2 parents 0ab8ad8 + 3268f2b commit 6564781
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions kytos/core/kytosd.py
Expand Up @@ -102,11 +102,15 @@ def main():

config = KytosConfig().options['daemon']

if config.foreground:
async_main(config)
else:
with daemon.DaemonContext():
if config.daemon:
if config.foreground:
async_main(config)
else:
with daemon.DaemonContext():
async_main(config)
else:
config.foreground = True
async_main(config)


def async_main(config):
Expand Down
2 changes: 1 addition & 1 deletion kytos/templates/kytos.conf.template
Expand Up @@ -15,7 +15,7 @@ pidfile = {{ prefix }}/var/run/kytos/kytosd.pid
# mode. On daemon mode, the process will detach from terminal when starts,
# running in background. When running on 'interactive' mode, you will receive a
# console right after the controller starts. Default is 'interactive' mode.
daemon = False
daemon = True

# Run the controller in debug mode or not. Default is False.
debug = False
Expand Down

0 comments on commit 6564781

Please sign in to comment.