motion.init-rh.in
来自「video motion detection of linux base」· IN 代码 · 共 84 行
IN
84 行
#!/bin/bash## Startup script for the Motion Detection System ## chkconfig: - 85 15# description: Motion Detection System. It is used to detect \# movement based on compare images.# processname: motion # pidfile: /var/run/motion.pid# config: /etc/motion.conf# Source function library.. /etc/rc.d/init.d/functionsmotion=${MOTION-@BIN_PATH@/motion}prog=motionPIDFILE=/var/run/motion.pidRETVAL=0start() { echo -n $"Starting $prog: " daemon $motion RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/motion return $RETVAL}stop() { echo -n $"Stopping $prog: " killproc $motion RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/motion}stopsafe() { echo -n $"Stopping $prog: ( for restarting ) " killproc $motion RETVAL=$? sleep 10s echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/motion}reload() { echo -n $"Reloading $prog: " killproc $motion -HUP RETVAL=$? echo}# See how we were called.case "$1" in start) start ;; stop) stop ;; status) status $motion RETVAL=$? ;; restart) stopsafe start ;; condrestart) if [ -f /var/run/motion.pid ] ; then stop start fi ;; reload) reload ;; *) echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}" exit 1esacexit $RETVAL
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?