summaryrefslogtreecommitdiffstats
path: root/package/motion/S99motion
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2016-09-27 23:37:47 +0200
committerPeter Korsgaard <peter@korsgaard.com>2016-10-13 23:54:21 +0200
commit7fabade2ab66272acb80f41e7fb5265fc32072f8 (patch)
treefda15aee0440944489dc4dd06b5fefc357ac21bb /package/motion/S99motion
parent4c4f400007316127c9f5a4a7b843fac65c36a04d (diff)
downloadbuildroot-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/S99motion37
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 $?
OpenPOWER on IntegriCloud