Advertisement
Guest User

steven

a guest
Dec 24th, 2010
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. isconnected=`hcitool inq 00:00:00:00:00:00 | grep 00:00:00:00:00:00`
  4. echo $isconnected
  5. phoneid="00:00:00:00:00:00"
  6. if [ "$isconnected" > "$phoneid" ];
  7. then
  8. while [ "$isconnected" > "$phoneid" ] ; do
  9. gammu --geteachsms > /tmp/gammu_sms.tmp
  10. ./smsparser
  11.  
  12. if [ -f /home/USER/opt/spool/gammu/.notify ]
  13. then
  14. notify-send --icon=blueman "Text Message Received"
  15. mpg123 -q /home/USER/sounds/pc_up_msg.mp3
  16.  
  17. fi
  18.  
  19. ## to be marking them as read...
  20. ## for i in *.txt; do mv "$i" "${i/_unread.txt}"_read.txt; done
  21. #code
  22. sleep 120
  23. isconnected=`hcitool inq 00:00:00:00:00:00 | grep 00:00:00:00:00:00`
  24. done
  25. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement