13 lines
438 B
Bash
Executable File
13 lines
438 B
Bash
Executable File
#!/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
|