diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-10-12 21:05:10 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-10-12 21:05:10 +0200 |
commit | 6c2bc15eb5c40548f6a98c37ab0b825b9c163343 (patch) | |
tree | f002fe1b2c355f06627c9757dc9fc30c71435f43 /package/motion/files/motion.init | |
parent | decf972fcbb3b42947f8778222877ab1663ef04b (diff) | |
parent | e095941418bffcb4f2afc03072eb1f045e39ed9d (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/motion/files/motion.init')
-rw-r--r-- | package/motion/files/motion.init | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/package/motion/files/motion.init b/package/motion/files/motion.init new file mode 100644 index 000000000..1c8b7e705 --- /dev/null +++ b/package/motion/files/motion.init @@ -0,0 +1,27 @@ +#!/bin/sh +#PKG motion +#INIT 80 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${motion:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -f /etc/motion.conf ] || exit + /usr/bin/motion + ;; +stop) + kill $(pgrep -f /usr/bin/motion) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + ;; +esac +exit $? |