leds的内容如下:
#!/bin/sh
base=led-player
# See how we were called.
case "$1" in
start)
/usr/bin/$base &
;;
stop)
pid=`/bin/pidof $base`
if [ -n "$pid" ]; then
kill -9 $pid
fi
;;
esac
exit 0
执行les start后$0=leds, $1=start,所以会匹配start那项,$base=led-player,所以执行的还是led-player