#!/sbin/runscript # Copyright 2003 Martin Hierling # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/irexec-initd,v 1.2 2006/12/02 12:04:13 zzam Exp $ : ${IREXEC_USER:=root} depend() { need lircd } start() { ebegin "Starting irexec" HOME="/home/stefan" DISPLAY=":0.0" XAUTHORITY="/home/stefan/.Xauthority" start-stop-daemon --start --chuid stefan --user stefan --chdir /home/stefan \ --exec /usr/bin/irexec -- --daemon /home/stefan/.lircrc eend $? "Failed to start irexec." } stop() { ebegin "Stopping irexec" start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER} eend $? "Failed to stop irexec." }