diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2016-09-27 23:37:47 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2016-10-13 23:54:21 +0200 |
commit | 7fabade2ab66272acb80f41e7fb5265fc32072f8 (patch) | |
tree | fda15aee0440944489dc4dd06b5fefc357ac21bb /package/motion/S99motion | |
parent | 4c4f400007316127c9f5a4a7b843fac65c36a04d (diff) | |
download | buildroot-7fabade2ab66272acb80f41e7fb5265fc32072f8.tar.gz buildroot-7fabade2ab66272acb80f41e7fb5265fc32072f8.zip |
motion: new package
Motion is a program that monitors the video signal from
cameras. It is able to detect if a significant part of
the picture has changed; in other words, it can detect motion.
https://motion-project.github.io
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/motion/S99motion')
-rw-r--r-- | package/motion/S99motion | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/package/motion/S99motion b/package/motion/S99motion new file mode 100644 index 0000000000..36bfc23880 --- /dev/null +++ b/package/motion/S99motion @@ -0,0 +1,37 @@ +#!/bin/sh + +NAME=motion +PIDFILE=/var/run/$NAME.pid +DAEMON=/usr/bin/$NAME + +start() { + printf "Starting $NAME: " + start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping $NAME: " + start-stop-daemon -K -q -p $PIDFILE + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? |