1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__config_lalis/send_sms

13 lines
438 B
Plaintext
Raw Permalink Normal View History

2021-09-29 14:27:51 +02:00
#!/bin/bash
param=`echo "$1" | sed -e s/" "/%20/g`
text="user=19452708&pass=ZF8300U7iKyc9b&msg=$param"
TEMP=/tmp/send_sms.$USER
#echo "parameters : $param"
wget -O $TEMP "https://smsapi.free-mobile.fr/sendmsg?$text" -o /var/log/send_sms.log
if [ $? -eq 8 ];then
cat $TEMP
echo -e "Subject: sms not sent\n$text\n" >> $TEMP
cat /var/log/send_sms.log >> $TEMP
/usr/sbin/sendmail -f contact@lalis.fr -i contact@lalis.fr <$TEMP
fi