From 94e50e97e17031ac194628459abd20f7b7162ecb Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Wed, 12 Nov 2025 22:29:45 -0500 Subject: [PATCH] Support configuration file for Gotify setup --- gotify/.local/bin/gotify | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gotify/.local/bin/gotify b/gotify/.local/bin/gotify index 6bea560..458ed28 100755 --- a/gotify/.local/bin/gotify +++ b/gotify/.local/bin/gotify @@ -16,12 +16,17 @@ if [ $# -lt 3 ]; then exit 1 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" exit 1 fi -if [ -z "$GOTIFY_TOKEN" ]; then +if [ -z "${GOTIFY_TOKEN:-}" ]; then echo "[ERROR]: GOTIFY_TOKEN environment variable is not set" exit 1 fi