From c4f146aa4c53620734c3ad79ea233292851c8fd5 Mon Sep 17 00:00:00 2001 From: Michael Rodin Date: Sat, 2 Sep 2023 14:25:00 +0200 Subject: [PATCH] It works now --- example.env.py | 8 ++++++-- uptime-kuma-homepage.py | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/example.env.py b/example.env.py index e624351..e756302 100644 --- a/example.env.py +++ b/example.env.py @@ -1,4 +1,8 @@ +if __name__ == '__main__': + print("This is not a script!") + exit() + UPTIME_KUMA_ADMIN_USER='admin' -UPTIME_KUMA_ADMIN_PASSWORD='admin' +UPTIME_KUMA_ADMIN_PASSWORD='admin123' UPTIME_KUMA_URL='https://status.example.com' -UPTIME_KUMA_OUT='/path/to/file.html' +UPTIME_KUMA_OUT='/path/to/file.html' \ No newline at end of file diff --git a/uptime-kuma-homepage.py b/uptime-kuma-homepage.py index 7a32886..e93f0bb 100755 --- a/uptime-kuma-homepage.py +++ b/uptime-kuma-homepage.py @@ -1,5 +1,6 @@ #! /bin/python3 -import json,env +import json +from env import * from uptime_kuma_api import UptimeKumaApi, MonitorType descriptions = {