#!/bin/sh
# Title: ssh init script
# Subject: my ssh init scirpt 
#
# $Id: sshd,v 1.1 1998/02/25 10:17:46 ikuo Exp $
#
# /etc/init.d/sshd - Start/Stop the sshd daemon
#

#
# The network and streams should already be built by the time
# this script runs.
#
# If sshd is already executing, don't re-execute it.
#
PATH=/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
export PATH

case $1 in 
'start')
        if [ -f /usr/local/sbin/sshd -a -f /etc/sshd_config ]; then
                sshd
        fi
        ;;
'stop')
        if [ -f /etc/sshd.pid ]; then
                kill `cat /etc/sshd.pid`
        fi
        ;;
*)
        echo "usage: /etc/rc2.d/SA0sshd {start|stop}"
        ;;
esac
