#
# chkconfig: 2345 55 25
# description: Dropbear ssh server daemon
#
### BEGIN INIT INFO
# Provides: ssh
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Dropbear ssh  server daemon
### END INIT INFO
#
# processname: sshd
# config: /etc/ssh/ssh_host_dss_key
# config: /etc/ssh/ssh_host_rsa_key
# pidfile: /var/run/sshd.pid

SSHD_PATH=/sbin/sshd

[ -f /var/log/lastlog ] || ( echo > /var/log/lastlog )

. /etc/rc.status

rc_reset

case "$1" in
  start)
    echo -n "Starting sshd"
    startproc -q $SSHD_PATH
    rc_status -v
    ;;

  stop)
    echo -n "Stopping sshd"
    killproc -TERM $SSHD_PATH
    rc_status -v
    ;;

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

rc_exit

  
