將可執行程序uvc_stream(自己的應用程序) 放進 、sbin 目錄(主要給予權限),之后進入/ect/rc.d/init.d/目錄 ,新建文件,(我這里是USB_camera),文件內容:
#!/bin/sh
base=uvc_stream
#See how were called
case "$1" in
start)
$base &
;;
stop)
pid='/bin/pidof $base'
if [-n "$pid"];then
kill -9 $pid
fi
;;
esac
exit 0;