diff options
Diffstat (limited to 'sys-fs/owfs/files/owfs.initd')
-rwxr-xr-x | sys-fs/owfs/files/owfs.initd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-fs/owfs/files/owfs.initd b/sys-fs/owfs/files/owfs.initd new file mode 100755 index 000000000000..c8174110f1cf --- /dev/null +++ b/sys-fs/owfs/files/owfs.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-fs/owfs/files/owfs.initd,v 1.1 2007/12/17 17:26:35 wschlich Exp $ + +INSTANCE=${SVCNAME#*.} +PROGRAM=${SVCNAME%%.*} +PIDFILE=${PIDFILE:-/var/run/owfs/${PROGRAM}.pid} +OWUID=${OWUID:-owfs} +OWGID=${OWGID:-owfs} + +depend() { + need net + use logger owserver +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/bin/${PROGRAM} \ + --pidfile ${PIDFILE} -c ${OWUID}:${OWGID} -- \ + --pid_file ${PIDFILE} \ + --background --error_print 1 \ + ${OWHTTPD_OPTS:--m /var/lib/owfs/mnt --allow_other -s 127.0.0.1:9300} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \ + --pidfile ${PIDFILE} -u ${OWUID} + eend $? +} |