#!/bin/bash

PROGRAM=/usr/bin/denyhosts.py
RUNLEVEL=3
NEEDS="+remote_fs"
DESC="DenyHosts daemon"

. /etc/init.d/smgl_init
. /etc/sysconfig/denyhosts

ARGS="$DENYHOSTS_EMAIL  -c $DENYHOSTS_CONFIG  --daemon"

start()
{
  echo "Starting $DESC: $NAME"
  loadproc $PROGRAM $ARGS
  evaluate_retval
}

stop()
{
  echo "Stopping $DESC: $NAME "
  killproc $PROGRAM
  evaluate_retval
}

status()
{
  statusproc $PROGRAM
}

restart()
{
  echo "Restarting $DESC: $NAME"
  stop
  sleep 1
  start
}

