#!/bin/sh
########################################################################
# Begin power-profiles-daemon
#
# Description : Power-profiles-daemon
#
# Author      : Rahul Chandra
#
# Version     : BLFS 12.1
#
########################################################################

### BEGIN INIT INFO
# Provides:            power-profiles-daemon
# Required-Start:      dbus
# Required-Stop:       dbus
# Should-Stop:         xdm
# Default-Start:       2 3 4 5
# Default-Stop:        0 1 6
# Short-Description:   Starts the Power-profiles-daemon
# Description:   Starts the Power-profiles-daemon
# X-LFS-Provided-By:   BLFS
### END INIT INFO

. /lib/lsb/init-functions


case "$1" in
   start)

      log_info_msg "Starting Power Profiles Daemon"
      start_daemon /usr/libexec/power-profiles-daemon &
      evaluate_retval

      ;;

   stop)

      log_info_msg "Stopping Power Profiles Daemon"
      killproc /usr/libexec/power-profiles-daemon
      evaluate_retval

      ;;

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

   status)
      statusproc /usr/libexec/power-profiles-daemon
      ;;

   *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;
esac

# End /etc/init.d/power-profiles-daemon
