Browse Source

fix errors

json
neilpang 6 years ago
parent
commit
28c153a0a2
  1. 15
      notify/pushover.sh

15
notify/pushover.sh

@ -31,23 +31,20 @@ pushover_send() {
_saveaccountconf_mutable PUSHOVER_USER "$PUSHOVER_USER" _saveaccountconf_mutable PUSHOVER_USER "$PUSHOVER_USER"
PUSHOVER_DEVICE="${PUSHOVER_DEVICE:-$(_readaccountconf_mutable PUSHOVER_DEVICE)}" PUSHOVER_DEVICE="${PUSHOVER_DEVICE:-$(_readaccountconf_mutable PUSHOVER_DEVICE)}"
if [ -z "$PUSHOVER_DEVICE" ]; then
PUSHOVER_DEVICE=""
fi
if [ "$PUSHOVER_DEVICE" ]; then
_saveaccountconf_mutable PUSHOVER_DEVICE "$PUSHOVER_DEVICE" _saveaccountconf_mutable PUSHOVER_DEVICE "$PUSHOVER_DEVICE"
fi
PUSHOVER_PRIORITY="${PUSHOVER_PRIORITY:-$(_readaccountconf_mutable PUSHOVER_PRIORITY)}" PUSHOVER_PRIORITY="${PUSHOVER_PRIORITY:-$(_readaccountconf_mutable PUSHOVER_PRIORITY)}"
if [ -z "$PUSHOVER_PRIORITY" ]; then
PUSHOVER_PRIORITY="0"
fi
if [ "$PUSHOVER_PRIORITY" ]; then
_saveaccountconf_mutable PUSHOVER_PRIORITY "$PUSHOVER_PRIORITY" _saveaccountconf_mutable PUSHOVER_PRIORITY "$PUSHOVER_PRIORITY"
fi
PUSHOVER_SOUND="${PUSHOVER_SOUND:-$(_readaccountconf_mutable PUSHOVER_SOUND)}" PUSHOVER_SOUND="${PUSHOVER_SOUND:-$(_readaccountconf_mutable PUSHOVER_SOUND)}"
if [ -z "$PUSHOVER_SOUND" ]; then
if [ "$PUSHOVER_SOUND" ]; then
PUSHOVER_SOUND="" # Play default if not specified. PUSHOVER_SOUND="" # Play default if not specified.
fi
_saveaccountconf_mutable PUSHOVER_SOUND "$PUSHOVER_SOUND" _saveaccountconf_mutable PUSHOVER_SOUND "$PUSHOVER_SOUND"
fi
export _H1="Content-Type: application/json" export _H1="Content-Type: application/json"
_content="$(printf "*%s*\n" "$_content" | _json_encode)" _content="$(printf "*%s*\n" "$_content" | _json_encode)"

Loading…
Cancel
Save