From 95170a7d5f3970ca3d60bc24647cb9ea276792d2 Mon Sep 17 00:00:00 2001 From: olli Date: Sat, 1 Jul 2023 17:06:35 +0200 Subject: [PATCH] Update basics.yml --- basics.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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