#!/bin/sh
#
# irmanager     This shell script takes care of starting and stopping
#               irmanger (irda daemon).
#
# chkconfig: - 45 96
# description: lrmanager is the irda daemon required for irda to work \
# properly. 
#

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

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/irmanager ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting irmanager: "
        daemon irmanager -d 1
        echo
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down irmanager: "
	killproc irmanager
        echo
        ;;
  status)
	status irmanager
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
        echo "Usage: irda {start|stop|restart|reload|status}"
        exit 1
esac

exit 0
