ajout et mise à jour des outils
This commit is contained in:
12
send_sms
Executable file
12
send_sms
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/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
|
Reference in New Issue
Block a user