You would need to add some code to see if the PID being returned to
Mbuni is correct. Is Mbuni running as root?
On Sep 20, 2009, at 20:19, Ben Hardill wrote:
Hi,
I now have the mmsbox extras library sending MMS messages pretty
much as needed. I have bene looking to clean up few bits so I can
write the whole thing up.
I had already set up all a PPP connection using the phone that I
could bring up and down using the standard ifup and ifdown commands.
At first I tried just using "ifup ppp0" as the start-gprs script but
this didn't work because the command returns (I found the comment in
the src saying it should not return), so i replaced it with the
following script:
#!/bin/sh
echo $$ > /root/ppp-wrapper.pid
trap cleanExit INT TERM
cleanExit() {
echo "shutting down"
ifdown ppp0
rm -f /root/ppp-wrapper.pid
exit 0
}#!/bin/sh
echo $$ > /root/ppp-wrapper.pid
trap cleanExit INT TERM
cleanExit() {
echo "stopping ppp0"
ifdown ppp0
rm -f /root/ppp-wrapper.pid
exit 0
}
if [ `ifconfig | grep ppp0 | wc -l` -eq 0 ]
then
ifup ppp0
echo "started ppp0"
fi
while [ true ]; do
sleep 10
done
ifup ppp0
echo "started ppp0"
while [ true ]; do
sleep 10
done
This should start the ppp connection then look until it gets a TERM
signal. This works fine when I test it on the command line but
script doesn't seam to be getting the signal after the message has
been sent.
I have set gprs-pid=cat /root/ppp-wrapper.pid | head -1
Does anybody have any ideas?
Ben
--
http://flickr.com/photos/hardillb
http://twitter.com/hardillb
http://www.last.fm/user/hardillb
_______________________________________________
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users