Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/sshd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by niro, Mon Dec 13 22:52:07 2004 UTC revision 21 by niro, Fri Dec 31 18:41:48 2004 UTC
# Line 18  gen_keys() { Line 18  gen_keys() {
18   echo -e ${COLOREDSTAR}"Generating SSH-Hostkey ..."   echo -e ${COLOREDSTAR}"Generating SSH-Hostkey ..."
19   /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''   /usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''
20   fi   fi
21    
22   if [ ! -e /etc/ssh/ssh_host_dsa_key ]   if [ ! -e /etc/ssh/ssh_host_dsa_key ]
23   then   then
24   echo -e ${COLREDSTAR}"Generating DSA-Hostkey ..."   echo -e ${COLREDSTAR}"Generating DSA-Hostkey ..."
25   /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''   /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''
26   fi   fi
27    
28   if [ ! -e /etc/ssh/ssh_host_rsa_key ]   if [ ! -e /etc/ssh/ssh_host_rsa_key ]
29   then   then
30   echo -e ${COLOREDSTAR}"Generating RSA-Hostkey ..."   echo -e ${COLOREDSTAR}"Generating RSA-Hostkey ..."
# Line 36  case "$1" in Line 36  case "$1" in
36   start)   start)
37   gen_keys   gen_keys
38   echo -e ${COLOREDSTAR}"Starting SSH Server ..."   echo -e ${COLOREDSTAR}"Starting SSH Server ..."
39   loadproc /usr/sbin/sshd   start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid \
40     --startas /usr/sbin/sshd
41   update_svcstatus $1   update_svcstatus $1
42   splash svc_started "$(basename $0)" 0   splash svc_started "$(basename $0)" 0
43   ;;   ;;
44    
45   stop)   stop)
46   echo -e ${COLOREDSTAR}"Stopping SSH Server ..."   echo -e ${COLOREDSTAR}"Stopping SSH Server ..."
47   killproc /usr/sbin/sshd   start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid
48    
49   update_svcstatus $1   update_svcstatus $1
50   splash svc_stopped "$(basename $0)" 0   splash svc_stopped "$(basename $0)" 0
# Line 60  case "$1" in Line 60  case "$1" in
60   sleep 1   sleep 1
61   $0 start   $0 start
62   ;;   ;;
63    
64   status)   status)
65   statusproc /usr/sbin/sshd   statusproc /usr/sbin/sshd
66   ;;   ;;
67    
68   *)   *)
69   echo "Usage: $0 {start|stop|reload|restart|status}"   echo "Usage: $0 {start|stop|reload|restart|status}"
70   exit 1   exit 1
71   ;;   ;;
72  esac  esac

Legend:
Removed from v.20  
changed lines
  Added in v.21