diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-10-02 18:48:35 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-10-02 18:48:35 +0000 |
commit | 7b47ab28b9eddc6edbecad2bbef20e26b0f84d6d (patch) | |
tree | 532086fbaf41deebf100361b2eaf264cf9272a50 /media-video/motion/files | |
parent | Fix phonon deps (should be 'alternative'). Reported by Tomasz Golinski. (diff) | |
download | historical-7b47ab28b9eddc6edbecad2bbef20e26b0f84d6d.tar.gz historical-7b47ab28b9eddc6edbecad2bbef20e26b0f84d6d.tar.bz2 historical-7b47ab28b9eddc6edbecad2bbef20e26b0f84d6d.zip |
Use more recent s-s-d syntax wrt #380279 by Tom Hendrikx
Package-Manager: portage-2.2.0_alpha60/cvs/Linux x86_64
Diffstat (limited to 'media-video/motion/files')
-rw-r--r-- | media-video/motion/files/motion.initd-r2 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/media-video/motion/files/motion.initd-r2 b/media-video/motion/files/motion.initd-r2 new file mode 100644 index 000000000000..2e0b120feaf7 --- /dev/null +++ b/media-video/motion/files/motion.initd-r2 @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/files/motion.initd-r2,v 1.1 2011/10/02 18:48:35 ssuominen Exp $ + +extra_started_commands="reload" + +_create_motion_run_dir() { + local dir="/var/run/motion" + if ! [ -d "$dir" ]; then + mkdir -p -m750 "$dir" + chown ${MOTION_USER}:${MOTION_GROUP} "$dir" + fi +} + +depend() { + need modules + after mysql +} + +start() { + _create_motion_run_dir + + ebegin "Starting motion detection" + start-stop-daemon --start -u ${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 $? +} |