diff --git a/basics.yml b/basics.yml index cddd50e..226465a 100644 --- a/basics.yml +++ b/basics.yml @@ -757,8 +757,13 @@ g_nice g_lockfile - [ -f /usr/local/etc/notify.conf ] && . /usr/local/etc/notify.conf - + if [ -f /usr/local/etc/notify.conf ] + then + . /usr/local/etc/notify.conf + else + exit 1 + fi + to="$default_to" togroup="$default_togroup" @@ -808,6 +813,11 @@ echo "$message" | mail -s "notify.sh: $subj" $tomail fi + if ! [ -f /home/signal/.local/share/signal-cli/data/accounts.json ] + then + echo "No Signal account?!" + exit 1 + fi account=$(cat /home/signal/.local/share/signal-cli/data/accounts.json | jq -r '.accounts[0].number' | sed 's/+/_/') if [ -z "$account" ] then