Load config only when credentials are unset

This commit is contained in:
2025-11-19 00:01:28 -05:00
parent 1ad726d0f7
commit 655e6fffac

View File

@@ -16,9 +16,11 @@ if [ $# -lt 3 ]; then
exit 1
fi
if [ -d ~/.config/gotify ] && [ -f ~/.config/gotify/env ]; then
if [ -z "${GOTIFY_URL:-}" ] || [ -z "${GOTIFY_TOKEN:-}" ]; then
if [ -d ~/.config/gotify ] && [ -f ~/.config/gotify/env ]; then
# shellcheck disable=SC1090
. ~/.config/gotify/env
fi
fi
if [ -z "${GOTIFY_URL:-}" ]; then