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

Update daemon run sequence #197

Merged
merged 2 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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