I have a IP phone running busybox
I have obtained a script from the devs named avconv that can capture what is happening on the screen of the phone and to run it I use the following command
/data/avconv -f fbdev -r 25 -i /dev/fb0 /tmp/output.avi
When I m finished I hit Ctrl+C to stop the script.
Now I wanted to create a script that would run this command and then copy the output video to my tftp server. So I wrote the following which names the FileName with a date then runs the command and then the intention was to wait 5 seconds, find the pid (chop it to just keep the process ID), kill it and then send the FileName to my tftp..then delete the file..
FN=WE34_$(date +%Y%m%d-%H%M%S).avi /data/avconv -f fbdev -r 25 -i /dev/fb0 /tmp/$FN sleep 5 pid=`ps | grep avconv` pidchopped=`echo $pid | cut -d' ' -f 1` kill -5 $pidchopped tftp -pl /tmp/$FN -r $FN 192.168.1.50 rm -f /tmp/$FN
the problem is that the command in the 2nd line of the script does not stop to to execute the rest of my script..could you please help me..any tip/hint/input will be highly appreciated..thank you in advance!!