summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/opensshd.init.in
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-07-22 19:01:18 +0000
committerdes <des@FreeBSD.org>2008-07-22 19:01:18 +0000
commitf1596419c2717cb81dd4b676d5e0cf1a3e30e98c (patch)
tree9827eb822991aa369cf5d220fce40c3d2011c19f /crypto/openssh/opensshd.init.in
parent666aa9cc1660793c97ef29a6cb66dfbb894dde8f (diff)
downloadFreeBSD-src-f1596419c2717cb81dd4b676d5e0cf1a3e30e98c.zip
FreeBSD-src-f1596419c2717cb81dd4b676d5e0cf1a3e30e98c.tar.gz
Properly flatten openssh/dist.
Diffstat (limited to 'crypto/openssh/opensshd.init.in')
-rwxr-xr-xcrypto/openssh/opensshd.init.in82
1 files changed, 0 insertions, 82 deletions
diff --git a/crypto/openssh/opensshd.init.in b/crypto/openssh/opensshd.init.in
deleted file mode 100755
index c36c5c8..0000000
--- a/crypto/openssh/opensshd.init.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#!@STARTUP_SCRIPT_SHELL@
-# Donated code that was put under PD license.
-#
-# Stripped PRNGd out of it for the time being.
-
-umask 022
-
-CAT=@CAT@
-KILL=@KILL@
-
-prefix=@prefix@
-sysconfdir=@sysconfdir@
-piddir=@piddir@
-
-SSHD=$prefix/sbin/sshd
-PIDFILE=$piddir/sshd.pid
-SSH_KEYGEN=$prefix/bin/ssh-keygen
-HOST_KEY_RSA1=$sysconfdir/ssh_host_key
-HOST_KEY_DSA=$sysconfdir/ssh_host_dsa_key
-HOST_KEY_RSA=$sysconfdir/ssh_host_rsa_key
-
-
-checkkeys() {
- if [ ! -f $HOST_KEY_RSA1 ]; then
- ${SSH_KEYGEN} -t rsa1 -f ${HOST_KEY_RSA1} -N ""
- fi
- if [ ! -f $HOST_KEY_DSA ]; then
- ${SSH_KEYGEN} -t dsa -f ${HOST_KEY_DSA} -N ""
- fi
- if [ ! -f $HOST_KEY_RSA ]; then
- ${SSH_KEYGEN} -t rsa -f ${HOST_KEY_RSA} -N ""
- fi
-}
-
-stop_service() {
- if [ -r $PIDFILE -a ! -z ${PIDFILE} ]; then
- PID=`${CAT} ${PIDFILE}`
- fi
- if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then
- ${KILL} ${PID}
- else
- echo "Unable to read PID file"
- fi
-}
-
-start_service() {
- # XXX We really should check if the service is already going, but
- # XXX we will opt out at this time. - Bal
-
- # Check to see if we have keys that need to be made
- checkkeys
-
- # Start SSHD
- echo "starting $SSHD... \c" ; $SSHD
-
- sshd_rc=$?
- if [ $sshd_rc -ne 0 ]; then
- echo "$0: Error ${sshd_rc} starting ${SSHD}... bailing."
- exit $sshd_rc
- fi
- echo done.
-}
-
-case $1 in
-
-'start')
- start_service
- ;;
-
-'stop')
- stop_service
- ;;
-
-'restart')
- stop_service
- start_service
- ;;
-
-*)
- echo "$0: usage: $0 {start|stop|restart}"
- ;;
-esac
OpenPOWER on IntegriCloud