LCDd Startscript fuer lcdproc unter openSUSE
Version vom 20. November 2013, 20:21 Uhr von TomcatMJ (Diskussion | Beiträge) (TomcatMJ verschob Seite LCDd Startscript für lcdproc unter openSUSE nach LCDd Startscript fuer lcdproc unter openSUSE: Umlautsalat beseitigt (später mal gucken welches Duplikat wir nun behalten ;) ))
Da das von lcdproc mitgelieferte Startscript für openSUSE leider nicht in der vorhandenen Form funktionsfähig war, habe ich es zum Einsatz unter openSUSE angepasst wie in den Kommentarzeilen zu sehen ist:
#!/bin/sh
# This is the LCDd init-script for RPM based (RedHat, Mandrake) systems
#
# Copyright (C) 2001 Rene Wagner <reenoo@gmx.de>
# 2001 Guillaume Filion <gfk@logidac.com>
# Modified for use with openSUSE
# 2006 Tom Meierjürgen <tomcatmj@web.de>
#
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
#
# openSUSE compatibility modification start:
#
### BEGIN INIT INFO
# Provides: LCDd-lcdproc
# Required-Start: $local_fs $syslog $network
# X-UnitedLinux-Should-Start: inetd sensors
# Required-Stop: $local_fs $syslog
# X-UnitedLinux-Should-Stop: inetd sensors
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: LCDd lcdproc server daemon
# Description: start LCDd lcdproc server daemon which displays system informations on a LCD
### END INIT INFO
#
# chkconfig: 345 70 21
# description: LCDd(8) is the LCDproc server used for displaying text and other data to LCDs. \
# Apart from the main client lcdproc(1) there are various clients. \
# See http://lcdproc.omnipotent.net for details.
# processname: LCDd
# pidfile: /var/run/LCDd.pid
# config: ${prefix}/etc/LCDd.conf
# Source function library.
#. /etc/rc.d/init.d/functions
# Source networking configuration.
#. /etc/sysconfig/network
# Check that networking is up.
#if [ ${NETWORKING} = "no" ]; then
# exit 0
#fi
#
#
# Modification end
#
RETVAL=0
prefix=/usr/local
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
etc=${prefix}/etc
LCDd=${sbindir}/LCDd
configfile=${etc}/LCDd.conf
[ -x ${LCDd} ] || exit 0
start() {
echo -n "Starting up LCDd: "
# daemon ${LCDd} -c ${configfile}
${LCDd} -c ${configfile}
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/LCDd
echo
}
stop() {
echo -n "Shutting down LCDd: "
killproc LCDd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/LCDd
echo
}
dostatus() {
status LCDd
RETVAL=$?
}
restart() {
stop
start
RETVAL=$?
}
condrestart() {
[ -e /var/lock/subsys/LCDd ] && restart || :
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
dostatus
;;
restart)
restart
;;
condrestart)
condrestart
;;
*)
echo "Usage: $0 {start|stop|status|restart|condrestart}"
exit 1
esac
exit $RETVAL
--TomcatMJ 23:34, 6. Dez 2006 (CET)