aboutsummaryrefslogtreecommitdiffstats
path: root/testing/motion/motion.initd
blob: 78493c3d44e4d11bfdabc1cbc27ae8db183c83ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/files/rsyncd.init.d,v 1.5 2007/02/23 11:33:59 uberlord Exp $

description="motion daemon"
user="motion"
command="/usr/bin/motion"
pidfile="/var/run/${RC_SVCNAME}/${RC_SVCNAME}.pid"

start() {
	ebegin "Starting ${RC_SVCNAME}"
	start-stop-daemon --start \
	    --exec ${command} \
	    --user ${user} \
	    --pidfile ${pidfile} \
	    -- ${MOTION_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping ${RC_SVCNAME}"
	start-stop-daemon --stop \
	    --exec ${command} \
	    --pidfile ${pidfile}
	eend $?
}