File: init-lcdproc.rpm.in

package info (click to toggle)
lcdproc 0.5.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,064 kB
  • sloc: ansic: 59,645; sh: 1,740; perl: 681; makefile: 417
file content (108 lines) | stat: -rw-r--r-- 2,243 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/sh
# This is the lcdproc init-script for RPM based (RedHat, Mandrake) systems
#
# Copyright (C) 2001  Rene Wagner <reenoo@gmx.de>
#               2001  Guillaume Filion <gfk@logidac.com>
#
# 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
#
#
# chkconfig: 345 71 20
# 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: lcdproc
# pidfile: /var/run/lcdproc.pid
# config: /etc/sysconfig/lcdproc

# 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

RETVAL=0

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
etc=@sysconfdir@

lcdproc=${bindir}/lcdproc

[ -x ${lcdproc} ] || exit 0


start() {
	echo -n "Starting up lcdproc: "
	daemon ${lcdproc} $SCREENS

	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/lcdproc
	echo
}

stop() {
	echo -n "Shutting down lcdproc: "
	killproc lcdproc
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/lcdproc
	echo
}

dostatus() {
	status lcdproc
	RETVAL=$?
}

restart() {
	stop
	start
	RETVAL=$?
}

condrestart() {
	[ -e /var/lock/subsys/lcdproc ] && 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