From 781d93597ca51235a54294825df5545db0347a04 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 5 Nov 2016 20:28:19 +0000 Subject: [PATCH] Change consolidate shutdown with restart, improve systemd support, bring order to on-init globals. --- CHANGES.md | 1 + SickBeard.py | 269 +++++++----- .../default/inc_addShowOptions.tmpl | 2 +- gui/slick/interfaces/default/restart.tmpl | 33 +- init-scripts/init.systemd | 22 +- sickbeard/__init__.py | 397 ++++++++---------- sickbeard/config.py | 1 - sickbeard/webserve.py | 16 +- tests/xem_tests.py | 2 +- 9 files changed, 361 insertions(+), 382 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9f96b6fc..0ed8fdaf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -191,6 +191,7 @@ * Change improve performance and reduce start up time * Fix button "Checkout branch" when stuck on disabled * Add 'Download Log' to 'Logs & Errors' page +* Change consolidate shutdown with restart, improve systemd support, bring order to on-init globals [develop changelog] * Change send nzb data to NZBGet for Anizb instead of url diff --git a/SickBeard.py b/SickBeard.py index 814bcfb1..86bd6292 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -80,48 +80,69 @@ class SickGear(object): sickbeard.events = Events(self.shutdown) # daemon constants - self.runAsDaemon = False - self.CREATEPID = False - self.PIDFILE = '' + self.run_as_daemon = False + self.create_pid = False + self.pid_file = '' + + self.run_as_systemd = False + self.console_logging = False # webserver constants self.webserver = None - self.forceUpdate = False - self.forcedPort = None - self.noLaunch = False + self.force_update = False + self.forced_port = None + self.no_launch = False + + self.web_options = None + self.webhost = None + self.start_port = None + self.log_dir = None @staticmethod def help_message(): """ print help message for commandline options """ - help_msg = '\n' - help_msg += 'Usage: %s