Fixed small mistakes in log messages

This commit is contained in:
Pawel Derehajlo
2023-08-22 22:27:48 +02:00
parent dbbeba055f
commit 65fb4203b6
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ class SwagUptimeKuma:
self._api.delete_monitor(monitorData['id']) self._api.delete_monitor(monitorData['id'])
def deleteMonitors(self, containerNames): def deleteMonitors(self, containerNames):
print(f"{logPrefix} Deleting all monitors that had their containers removed") print(f"{logPrefix} Deleting all monitors that had their containers removed or were disabled")
if (containerNames): if (containerNames):
for containerName in containerNames: for containerName in containerNames:
self.deleteMonitor(containerName) self.deleteMonitor(containerName)
@@ -152,7 +152,7 @@ class SwagUptimeKuma:
def getMonitorSwagTagValue(self, monitorData): def getMonitorSwagTagValue(self, monitorData):
""" """
This value is container name itself. Used to link containers with monitors This value is container name itself. Used to link containers with monitors.
""" """
for tag in monitorData.get('tags'): for tag in monitorData.get('tags'):
if (has_key_with_value(tag, "name", self.swagTagName)): if (has_key_with_value(tag, "name", self.swagTagName)):
@@ -1,12 +1,12 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
echo "[mod-swag-auto-uptime-kuma] Installing SWAG auto-uptime-kuma packages" echo "[mod-auto-uptime-kuma] Installing SWAG auto-uptime-kuma packages"
if ! pip list 2>&1 | grep -q "uptime-kuma-api\|docker"; then if ! pip list 2>&1 | grep -q "uptime-kuma-api\|docker"; then
echo "\ echo "\
docker \ docker \
uptime-kuma-api" >> /mod-pip-packages-to-install.list uptime-kuma-api" >> /mod-pip-packages-to-install.list
echo "[mod-swag-auto-uptime-kuma] Successfuly installed packages" echo "[mod-auto-uptime-kuma] Successfuly installed packages"
else else
echo "[mod-swag-auto-uptime-kuma] Packages already installed, skipping..." echo "[mod-auto-uptime-kuma] Packages already installed, skipping..."
fi fi
@@ -1,11 +1,11 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
if [ -z "$UPTIME_KUMA_URL" ] || [ -z "$UPTIME_KUMA_USERNAME" ] || [ -z "$UPTIME_KUMA_PASSWORD" ]; then if [ -z "$UPTIME_KUMA_URL" ] || [ -z "$UPTIME_KUMA_USERNAME" ] || [ -z "$UPTIME_KUMA_PASSWORD" ]; then
echo "[mod-swag-auto-uptime-kuma] Missing required environment variables. Please refer to the Readme, skipping..." echo "[mod-auto-uptime-kuma] Missing required environment variables. Please refer to the Readme, skipping..."
exit 0 exit 0
fi fi
echo "[mod-swag-auto-uptime-kuma] Executing SWAG auto-uptime-kuma mod" echo "[mod-auto-uptime-kuma] Executing SWAG auto-uptime-kuma mod"
scriptPath='/app/auto-uptime-kuma.py' scriptPath='/app/auto-uptime-kuma.py'