add-healthcheck-support #17

Merged
jblu merged 2 commits from add-healthcheck-support into main 2023-06-05 23:18:25 -05:00
Showing only changes of commit 43c79b13ca - Show all commits

View File

@ -10,20 +10,17 @@ def apprise_notify(req_obj, host, port, aurls, title, body):
class AppriseClient: class AppriseClient:
def __init__(self): def __init__(self):
self.config = '' if os.getenv("DOCKER"):
try: self.host = os.getenv("host")
if os.get["DOCKER"]: self.port = os.getenv("port")
self.host = os.environ["host"] self.aurls = os.getenv("aurls")
self.port = os.environ["port"] self.title = os.getenv("title")
self.aurls = os.environ["aurls"] self.body = os.getenv("body")
self.title = os.environ["title"] if os.getenv("toml_path"):
self.body = os.environ["body"] config_file_path=os.getenv("toml_path")
if os.environ["toml_path"]: with open(config_file_path, 'rb') as c:
config_file_path=os.environ["toml_path"] self.config = load(c)
with open(config_file_path, 'rb') as c:
self.config = load(c)
except:
KeyError
if os.path.exists('./config.toml'): if os.path.exists('./config.toml'):
config_file_path = './config.toml' config_file_path = './config.toml'
with open(config_file_path, 'rb') as c: with open(config_file_path, 'rb') as c: