Search
j0ke.net Open Build Service
>
Projects
>
multimedia
:
EL6
>
lirc
> lircd.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File lircd.init of Package lirc
#!/bin/sh # # $Id: lircd.init,v 1.1 2002/09/28 11:54:12 dude Exp $ # Startup script for the Linux Infrared Remote Control. # # chkconfig: - 90 10 # description: Enables infrared controls through LIRC. # # config: /etc/lirc/lircd.conf # Source 'em up . /etc/init.d/functions [ -x @SBINDIR@/lircd ] || exit 1 [ -x @SBINDIR@/lircmd ] || exit 1 [ -f /etc/lirc/lircd.conf ] || [ -f /etc/lirc/lircmd.conf ] || exit 1 [ -f /etc/sysconfig/lircd ] && . /etc/sysconfig/lircd RETVAL=0 start(){ if [ -f /etc/lirc/lircd.conf ]; then echo -n $"Starting infrared remote control daemon: " chcon -u system_u -t lircd_var_run_t /var/run/lirc \ > /dev/null 2>&1 || : daemon lircd $LIRCD_OPTIONS RETVAL=$? echo fi if [ -f /etc/lirc/lircmd.conf ]; then echo -n $"Starting infrared remote control mouse daemon: " daemon lircmd RETVAL=$? echo fi if [ -f /etc/lirc/lircrc ]; then echo -n $"Starting infrared command execution daemon: " daemon irexec --daemon /etc/lirc/lircrc RETVAL=$? echo fi touch /var/lock/subsys/lircd return $RETVAL } stop(){ if [ -f /etc/lirc/irexec.conf ]; then echo -n $"Stopping infrared command execution daemon: " killproc irexec echo fi if [ -f /etc/lirc/lircmd.conf ]; then echo -n $"Stopping infrared remote control mouse daemon: " killproc lircmd echo fi if [ -f /etc/lirc/lircd.conf ]; then echo -n $"Stopping infrared remote control daemon: " killproc lircd echo fi RETVAL=$? rm -f /var/lock/subsys/lircd return $RETVAL } restart(){ stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; status) status lircd ;; condrestart) [ -e /var/lock/subsys/lircd ] && restart ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart}" RETVAL=1 esac exit $RETVAL