#!/bin/sh
########################################################################
# Begin lightdm
#
# Description : LightDM Boot Script
#
# Authors     : Bruce Dubbbs - bdubbs@linuxfromscratch.org
#
# Version     : BLFS 8.0
#
########################################################################

### BEGIN INIT INFO
# Provides:            lightdm
# Required-Start:      $local_fs $last
# Should-Start:
# Required-Stop:       $local_fs $first
# Should-Stop:
# Default-Start:       5
# Default-Stop:        0 1 2 3 4 6
# Short-Description:   Starts lightdm.
# Description:         Starts lightdm daemon.
# X-LFS-Provided-By:   BLFS
### END INIT INFO

. /lib/lsb/init-functions
[ -e /opt/xorg/bin/X ] && . /etc/profile 

BIN_FILE="/usr/bin/lightdm"

#$LastChangedBy$
#$Date$

case $1 in
   start)
        log_info_msg "Starting lightdm..."
        start_daemon $BIN_FILE &
        evaluate_retval
        ;;

   stop)
        log_info_msg "Stopping lightdm..."
        killproc $BIN_FILE
        evaluate_retval
        ;;

   restart)
        $0 stop
        sleep 2
        $0 start
        ;;

   status)
        statusproc ${BIN_FILE}
        ;;

   *)
        echo "usage: $0 [start|stop|restart|status]"
        exit 1
        ;;
esac

# End /etc/rc.d/init.d/lightdm
