--- trunk/magellan-initscripts/etc/rc.d/init.d/sshd 2004/12/31 18:41:21 20 +++ trunk/magellan-initscripts/etc/rc.d/init.d/sshd 2004/12/31 18:41:48 21 @@ -18,13 +18,13 @@ echo -e ${COLOREDSTAR}"Generating SSH-Hostkey ..." /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N '' fi - + if [ ! -e /etc/ssh/ssh_host_dsa_key ] then echo -e ${COLREDSTAR}"Generating DSA-Hostkey ..." /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' fi - + if [ ! -e /etc/ssh/ssh_host_rsa_key ] then echo -e ${COLOREDSTAR}"Generating RSA-Hostkey ..." @@ -36,15 +36,15 @@ start) gen_keys echo -e ${COLOREDSTAR}"Starting SSH Server ..." - loadproc /usr/sbin/sshd - + start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid \ + --startas /usr/sbin/sshd update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) echo -e ${COLOREDSTAR}"Stopping SSH Server ..." - killproc /usr/sbin/sshd + start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 @@ -60,11 +60,13 @@ sleep 1 $0 start ;; + status) statusproc /usr/sbin/sshd ;; + *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 - ;; + ;; esac