Hi, I am trying to use mplayer to rip mms stream, using cron, but I can't kill the process:
Code:
#!/bin/sh

mount -o bind /proc /usb/sda1/debian/proc
mount -o bind /dev /usb/sda1/debian/dev
mount -o bind /usb/sdb1/media/music/record /usb/sda1/debian/mnt/sda1/record
chroot /usb/sda1/debian/ mplayer -dumpstream -dumpfile /mnt/sda1/record/`eval date +%Y.%m.%d_%H.%M.%S`.wmv mms://bcr.media.hinet.net/RA000072 -endpos 60 -cache 64 & sleep 60 should be in the same line but can't kill the process, it seems not to recognize the kill process in chroot env
for s in HUP INT KILL; do
    kill -$s $! &>/dev/null || break
    sleep 5
done

exit