#!/bin/sh
#
# blocksshd           This shell script takes care of
#
# chkconfig: 2345 55 45
# description: blocksshd daemon
# probe: true

# 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/bin/blocksshd ] || exit 0

[ -f /etc/blocksshd.conf ] || exit 0

# See how we were called.
case "$1" in
    start)
          # Start daemon.
          echo -n "Starting blocksshd: "
          /usr/bin/blocksshd --start
          echo
          ;;
    stop)
          # Stop daemon.
          echo -n "Shutting down blocksshd: "
          /usr/bin/blocksshd --stop 
          echo
          ;;
    restart)
          $0 stop
          $0 start
          exit $?
          ;;

    *)
          echo "Usage: blocksshd {start|stop|restart}"
          exit 1
  esac

  exit 0
