3 # ---------------------------------------------------------------------
5 # LIRC starter (called 'lircs' for simplicity)
7 # A simple shell script to make the configuration of LIRC more comfortable.
9 # It may be necessary to change the script if ...
10 # - you have a non-standard installation or
11 # - you use more or other client applications (see below) or
12 # - the init scripts are located elsewhere on your Linux system (see below).
14 # ---------------------------------------------------------------------
16 # author: Michael Kammerer <M.Kammerer@gmx.de>
18 # PLEASE send me your comments, ideas, bug reports, ... via E-Mail.
20 # ---------------------------------------------------------------------
22 # location of the LIRC config file
23 # change this if your LIRC config file is located elsewhere
24 CONFIG_FILE
=${HOME}/.lircrc
26 # any editor to edit LIRC config file
31 # function declarations
34 if [ -s ${CONFIG_FILE} ]; then
35 echo -n Starting LIRC clients ...
37 # add more clients HERE or change the ones I put here as a start
43 echo "LIRC config file not found in ${CONFIG_FILE}"
49 if [ "${USER}" = "root" ]; then
50 # change this if your Linux system keeps the init scripts elsewhere
51 /sbin
/init.d
/lircd restart
53 echo "`basename ${0}`: you must be 'root' to restart the LIRC daemon (lircd)."
59 if [ "${USER}" = "root" ]; then
60 # change this if your Linux system keeps the init scripts elsewhere
61 /sbin
/init.d
/lircd stop
63 echo "`basename ${0}`: you must be 'root' to stop the LIRC daemon (lircd)."
69 ${FILE_EDITOR} ${CONFIG_FILE}
73 echo "LIRC starter version 0.2, 09/2000 "
74 echo "Written by Michael Kammerer <M.Kammerer@gmx.de>."
75 echo "Visit 'www.crosswinds.net/~michaelkammerer/lircs' for updates."
79 echo "LIRC starter usage: lirc [option]"
80 echo "'option' can be:"
82 echo "-h | --help print this short help text"
83 echo "-c | --clients start LIRC clients (necessary if lircd was restarted)"
84 echo "-e | --edit edit LIRC config file '${CONFIG_FILE}'"
85 echo "-v | --version print script version and other info"
86 echo "only as 'root':"
87 echo "-r | --restart restart LIRC daemon (lircd) "
88 echo "-s | --stop stop LIRC daemon"
92 # processing of command line arguments