
08-10-2008, 01:31 PM
|
 |
What's Jailbreak?
|
|
Join Date: Oct 2007
Posts: 4
Thanks: 4
Thanked 1 Time in 1 Post
|
|
|
|
here is the original SMSnotify 2.0 (.sh) file jusy for reference
#!/bin/bash
SMSNOTIFY_PATH=/usr/local/smsnotify
while test 1
do
if [ `echo 'select count(*) from message where flags=0;' | sqlite3 /var/mobile/Library/SMS/sms.db` -gt 0 ]
then
#Each parameter to vibrate is 1 more vibration, so vibrate 3 times
$SMSNOTIFY_PATH/vibrate 1 1
sleep 3
fi
if [ `echo 'select count(*) from voicemail where flags & 1 == 0;' | sqlite3 /var/mobile/Library/Voicemail/voicemail.db` -gt 0 ]
then
#vibrate 2 times
$SMSNOTIFY_PATH/vibrate 1
sleep 3
fi
#This program sleeps for 5 seconds then checks how long it's been sleeping. If it's been more than 10 seconds the phone has slept and it exits, allowing the loop to continue
$SMSNOTIFY_PATH/waitforsleep
done
|
|