From 0481948db8434a52ddbad79bc23642230c7e04b4 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 28 May 2020 17:55:06 +0200 Subject: [PATCH] SMS COMMAND from LOVELAND entrance --- cron_MINUTE.sh | 10 ++++++++++ g1sms/sms_ASTROPORT.sh | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 7685434..d6c606f 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -51,6 +51,16 @@ dayofthemonth=$(date +%d) weeknumber=$(date +%V) echo $timebar + +# +# _________ +# / ____< /________ ___ _____ +# / / __ / / ___/ __ `__ \/ ___/ +#/ /_/ // (__ ) / / / / (__ ) +#\____//_/____/_/ /_/ /_/____/ +# +$MY_PATH/g1sms/sms_ASTROPORT.sh + # TIME NTP SYNC: TODO: Problem being root (stickybit INSTALL?) # G1Tx. G1sms. G1Dab Zen economy needs precise time sync (RpiZero !!) # Tx rates is limited by Station time synchronisation. diff --git a/g1sms/sms_ASTROPORT.sh b/g1sms/sms_ASTROPORT.sh index f9260c3..3d77bab 100755 --- a/g1sms/sms_ASTROPORT.sh +++ b/g1sms/sms_ASTROPORT.sh @@ -12,7 +12,7 @@ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized -[[ ! $(which gammu-smsd-inject) ]] && exit 0 ## TODO: ONLY SMS equiped NODE run that part of code !! DO BETTER +[[ ! $(which gammu-smsd-inject) ]] && exit 0 ## TODO: ONLY SMS equiped NODE run that part of code !! DO IT BETTER MAY BE source $MY_PATH/init.sh source $MY_PATH/functions.sh @@ -74,8 +74,11 @@ for hashfile in /tmp/loveland_entrance/*; do # Send response SMS sms_SEND "$PHONE" "$mess" - fi - + fi + + ### REMOVE SMS COMMAND from LOVELAND entrance + [[ -f $hashfile ]] && rm -f $hashfile + done [[ -d /home/$YOU/.zen/g1sms/$PHONE ]] && [[ $(whoami) == "root" ]] && chown -R $YOU /home/$YOU/.zen/g1sms/$PHONE