#!/bin/sh # sendsms # sms_client wrapper # By Andrew Dalgleish # # changed for use of "YAPS" as SMS-Prog (using with ISDN-Card9 # Heiko Teichmeier, Glauchau / Saxonia # Mail: # Web : http://www.tei-lin-net.de # Date: 10.12.2003 if test ! "$BBTMP" # GET DEFINITIONS IF NEEDED then . $BBHOME/etc/bbdef.sh # INCLUDE STANDARD DEFINITIONS fi #*** Changed *** SMS_CLIENT=/usr/bin/yaps if [ ! -x "$SMS_CLIENT" ] then echo "SMS_CLIENT not set properly in 'BBHOME'/bin/sendsms" exit 1 fi #----------------------------------------------------------------------------- # Send a message using sms_client, multiple attempts #----------------------------------------------------------------------------- # I=1 while test $I -le 10 do # echo "page; trying to send, attempt: $I" I=`$EXPR $I + 1` # Make sure the message is wrapped in quotes, else sms_client will send it one word per SMS # #*** Changed *** $SMS_CLIENT "$1" "$2" -S "" > /dev/null # # Option '-S ""' supressed the yaps-Sever-Signatur # if you not doing this the message will be to long and you get 2 sms # at every failure-message # if test "$?" = "0" then I=999 # make sure loop ends... fi done