1 #!@STARTUP_SCRIPT_SHELL@
2 # Donated code that was put under PD license.
4 # Stripped PRNGd out of it for the time being.
12 sysconfdir=@sysconfdir@
15 SSHD=$prefix/sbin/sshd
16 PIDFILE=$piddir/sshd.pid
17 PidFile=`grep "^PidFile" ${sysconfdir}/sshd_config | tr "=" " " | awk '{print $2}'`
18 [ X$PidFile = X ] || PIDFILE=$PidFile
19 SSH_KEYGEN=$prefix/bin/ssh-keygen
22 if [ -r $PIDFILE -a ! -z ${PIDFILE} ]; then
23 PID=`${CAT} ${PIDFILE}`
25 if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then
28 echo "Unable to read PID file"
33 # XXX We really should check if the service is already going, but
34 # XXX we will opt out at this time. - Bal
36 # Check to see if we have keys that need to be made
40 echo "starting $SSHD... \c" ; $SSHD
43 if [ $sshd_rc -ne 0 ]; then
44 echo "$0: Error ${sshd_rc} starting ${SSHD}... bailing."
66 echo "$0: usage: $0 {start|stop|restart}"