53 lines
1.2 KiB
Bash
53 lines
1.2 KiB
Bash
#!/bin/sh -e
|
|
#
|
|
# lcdd Startup script for LCDd
|
|
#
|
|
# Modified for autoconf
|
|
# by Rene Wagner <reenoo@gmx.de>
|
|
# Modified for lcd-server
|
|
# by Joris Robijn <joris@robijn.net>
|
|
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
|
|
# Modified for Debian GNU/Linux
|
|
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
|
#
|
|
# Version: $Id$
|
|
|
|
DESC="LCDd @VERSION@"
|
|
|
|
prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
bindir=@bindir@
|
|
sbindir=@sbindir@
|
|
etc=@sysconfdir@
|
|
|
|
LCDd=${sbindir}/LCDd
|
|
configfile=${etc}/LCDd.conf
|
|
|
|
test -x ${LCDd} || exit 0
|
|
|
|
case "$1" in
|
|
start)
|
|
printf "Starting $DESC:"
|
|
start-stop-daemon --start --quiet --background --exec ${LCDd} -- -s -f -c ${configfile}
|
|
printf " LCDd"
|
|
printf ".\n"
|
|
;;
|
|
stop)
|
|
printf "Stopping $DESC:"
|
|
start-stop-daemon --stop --oknodo --quiet --exec ${LCDd}
|
|
printf " LCDd"
|
|
printf ".\n"
|
|
;;
|
|
restart | force-restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
*)
|
|
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|