#!/bin/bash
#
# kcare        KernelCare startup
#
# chkconfig: 2345 15 95
# description: Loads kernelcare patches on startup

# Source function library.
. /etc/rc.d/init.d/functions

prog="kcare"
bin="/usr/bin/kcarectl"
start() {
    $bin --update &
}

stop() {
    $bin --unload
}

restart() {
    stop
    start
}

# See how we were called.
case "$1" in
  start)
      start
      ;;
  stop)
      stop
      ;;
  restart|reload)
      restart
      ;;
  status)
      $bin --status
      RETVAL=$?
      ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload}"
        exit 1
esac

exit $RETVAL
