4
# Provides: landscape-client
5
# Required-Start: $local_fs $remote_fs hal dbus
6
# Required-Stop: $local_fs $remote_fs hal dbus
7
# Default-Start: 2 3 4 5
9
# Short-Description: Landscape client daemons
10
# Description: The Landscape client daemons are needed so the
11
# Landscape server can manage a computer.
14
LANDSCAPE_DEFAULTS=/etc/default/landscape-client
17
PIDFILE=/var/run/$NAME.pid
18
RUN=0 # overridden in /etc/default/landscape-client
20
[ -f $DAEMON ] || exit 0
22
. /lib/lsb/init-functions
23
[ -f $LANDSCAPE_DEFAULTS ] && . $LANDSCAPE_DEFAULTS
25
if [ $RUN -eq 0 ]; then
26
echo "$NAME is not configured, please run landscape-config."
32
log_daemon_msg "Starting the $NAME daemon"
33
start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- --daemon --pid-file $PIDFILE
38
log_daemon_msg "Stopping $NAME daemon"
39
start-stop-daemon --retry 30 --stop --quiet --pidfile $PIDFILE
44
# We want to maintain backward compatibility with Dapper,
45
# so we're not going to use status_of_proc()
46
pidofproc -p $PIDFILE $DAEMON >/dev/null
48
if [ $status -eq 0 ]; then
49
log_success_msg "$NAME is running"
51
log_failure_msg "$NAME is not running"
61
echo "Usage: $0 {start|stop|status|restart|force-reload}"