From 655e6fffac205703550383d483496ab829888a0d Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Wed, 19 Nov 2025 00:01:28 -0500 Subject: [PATCH] Load config only when credentials are unset --- gotify/.local/bin/gotify | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gotify/.local/bin/gotify b/gotify/.local/bin/gotify index 458ed28..507d7df 100755 --- a/gotify/.local/bin/gotify +++ b/gotify/.local/bin/gotify @@ -16,9 +16,11 @@ if [ $# -lt 3 ]; then exit 1 fi -if [ -d ~/.config/gotify ] && [ -f ~/.config/gotify/env ]; then - # shellcheck disable=SC1090 - . ~/.config/gotify/env +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