Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- isconnected=`hcitool inq 00:00:00:00:00:00 | grep 00:00:00:00:00:00`
- echo $isconnected
- phoneid="00:00:00:00:00:00"
- if [ "$isconnected" > "$phoneid" ];
- then
- while [ "$isconnected" > "$phoneid" ] ; do
- gammu --geteachsms > /tmp/gammu_sms.tmp
- ./smsparser
- if [ -f /home/USER/opt/spool/gammu/.notify ]
- then
- notify-send --icon=blueman "Text Message Received"
- mpg123 -q /home/USER/sounds/pc_up_msg.mp3
- fi
- ## to be marking them as read...
- ## for i in *.txt; do mv "$i" "${i/_unread.txt}"_read.txt; done
- #code
- sleep 120
- isconnected=`hcitool inq 00:00:00:00:00:00 | grep 00:00:00:00:00:00`
- done
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement