From 71c08ae30cfc402838a3e450e38555e5b92e7da0 Mon Sep 17 00:00:00 2001 From: Randall Hand Date: Fri, 24 Sep 2021 08:04:56 -0400 Subject: [PATCH 1/2] Properly format \n for multiline messages --- pushover.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pushover.sh b/pushover.sh index b2c3496..cef64e6 100755 --- a/pushover.sh +++ b/pushover.sh @@ -76,7 +76,7 @@ remove_duplicates() { } send_message() { local device="${1:-}" - + message=$(sed 's|\\n|\n|g' <<< $message) curl_cmd="\"${CURL}\" -s -S \ ${CURL_OPTS} \ -F \"token=${TOKEN}\" \ @@ -121,7 +121,7 @@ done if [ ! -z "${PUSHOVER_CONFIG}" ]; then CONFIG_FILE="${PUSHOVER_CONFIG}" else - CONFIG_FILE="${XDG_CONFIG_HOME-${HOME}/.config}/pushover.conf" + CONFIG_FILE="/etc/pushover.conf" fi if [ -e "${CONFIG_FILE}" ]; then . "${CONFIG_FILE}" From 4e4a2a4e1295f7b8c42f87793d9f38958f1ac44a Mon Sep 17 00:00:00 2001 From: Randall Hand Date: Sat, 25 Sep 2021 10:24:58 -0400 Subject: [PATCH 2/2] Revert the Config Path change. --- pushover.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushover.sh b/pushover.sh index cef64e6..5d89a09 100755 --- a/pushover.sh +++ b/pushover.sh @@ -121,7 +121,7 @@ done if [ ! -z "${PUSHOVER_CONFIG}" ]; then CONFIG_FILE="${PUSHOVER_CONFIG}" else - CONFIG_FILE="/etc/pushover.conf" + CONFIG_FILE="${XDG_CONFIG_HOME-${HOME}/.config}/pushover.conf" fi if [ -e "${CONFIG_FILE}" ]; then . "${CONFIG_FILE}"