Support configuration file for Gotify setup

This commit is contained in:
2025-11-12 22:29:45 -05:00
parent 13a7988ade
commit 94e50e97e1

View File

@@ -16,12 +16,17 @@ if [ $# -lt 3 ]; then
exit 1 exit 1
fi fi
if [ -z "$GOTIFY_URL" ]; then if [ -d ~/.config/gotify ] && [ -f ~/.config/gotify/env ]; then
# shellcheck disable=SC1090
. ~/.config/gotify/env
fi
if [ -z "${GOTIFY_URL:-}" ]; then
echo "[ERROR]: GOTIFY_URL environment variable is not set" echo "[ERROR]: GOTIFY_URL environment variable is not set"
exit 1 exit 1
fi fi
if [ -z "$GOTIFY_TOKEN" ]; then if [ -z "${GOTIFY_TOKEN:-}" ]; then
echo "[ERROR]: GOTIFY_TOKEN environment variable is not set" echo "[ERROR]: GOTIFY_TOKEN environment variable is not set"
exit 1 exit 1
fi fi