summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2007-11-19 21:09:03 +0000
committerAlexis Ballier <aballier@gentoo.org>2007-11-19 21:09:03 +0000
commit77f90ba94270cfc745b60fbc072c4ca214def91a (patch)
tree63cfd7a071ddd9870cf5832f27cab56c9b713cb7 /media-video/motion/files/motion.init-r1
parentrev bump per bug #154795 (diff)
downloadhistorical-77f90ba94270cfc745b60fbc072c4ca214def91a.tar.gz
historical-77f90ba94270cfc745b60fbc072c4ca214def91a.tar.bz2
historical-77f90ba94270cfc745b60fbc072c4ca214def91a.zip
version bump, tune a bit init script to let it run as non root, bug #157913
Package-Manager: portage-2.1.3.19
Diffstat (limited to 'media-video/motion/files/motion.init-r1')
-rw-r--r--media-video/motion/files/motion.init-r129
1 files changed, 29 insertions, 0 deletions
diff --git a/media-video/motion/files/motion.init-r1 b/media-video/motion/files/motion.init-r1
new file mode 100644
index 000000000000..70263988d082
--- /dev/null
+++ b/media-video/motion/files/motion.init-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/files/motion.init-r1,v 1.1 2007/11/19 21:09:03 aballier Exp $
+
+opts="${opts} reload"
+
+depend() {
+ need modules
+ after mysql
+}
+
+start() {
+ ebegin "Starting motion detection"
+ start-stop-daemon --start -c ${MOTION_USER} -g ${MOTION_GROUP} --quiet --exec /usr/bin/motion
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping motion detection"
+ start-stop-daemon --stop --quiet --exec /usr/bin/motion
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading motion detection configuration"
+ start-stop-daemon --stop --signal HUP --exec /usr/bin/motion
+ eend $?
+}