Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #197 from bjoernricks/check-before-init
Browse files Browse the repository at this point in the history
Update daemon run sequence
  • Loading branch information
jjnicola committed Feb 4, 2020
2 parents ead04ff + defdc97 commit 494987c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changes
- Modify __init__() method and use new syntax for super(). [#186](https://github.com/greenbone/ospd/pull/186)
- Create data manager and spawn new process to keep the vts dictionary. [#191](https://github.com/greenbone/ospd/pull/191)
- Update daemon start sequence. Run daemon.check before daemon.init now. [#197](https://github.com/greenbone/ospd/pull/197)

## [2.0.1] (unreleased)

Expand Down
4 changes: 2 additions & 2 deletions ospd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ def main(
atexit.register(remove_pidfile, pidfile=args.pid_file)
signal.signal(signal.SIGTERM, partial(remove_pidfile, args.pid_file))

daemon.init()

if not daemon.check():
return 1

daemon.init()

daemon.run(server)

return 0

0 comments on commit 494987c

Please sign in to comment.