Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- log_file=/home/pascal/Documents/Backup-Smartphone/log
- date=$(date "+%Y-%m-%d à %Hh%M")
- envoie_sms () {
- msg="Backup Smartphone vers Desktop"$'\n'$*
- curl -G -d user=user -d pass=password --data-urlencode msg="$msg" 'https://smsapi.free-mobile.fr/sendmsg'
- }
- echo > $log_file
- tail -fn0 $log_file | \
- while read line ; do
- if [[ $line = *received* ]] ; then
- envoie_sms "Sauvegarde terminée le $date"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement