rc.sshd (225825) | rc.sshd (248613) |
---|---|
1#! /bin/sh 2# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. 3# 4# Author: Jiri Smid <feedback@suse.de> 5# 6# /etc/init.d/sshd 7# 8# and symbolic its link --- 35 unchanged lines hidden (view full) --- 44case "$1" in 45 start) 46 # Generate any missing host keys 47 ssh-keygen -A 48 echo -n "Starting SSH daemon" 49 ## Start daemon with startproc(8). If this fails 50 ## the echo return value is set appropriate. 51 | 1#! /bin/sh 2# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. 3# 4# Author: Jiri Smid <feedback@suse.de> 5# 6# /etc/init.d/sshd 7# 8# and symbolic its link --- 35 unchanged lines hidden (view full) --- 44case "$1" in 45 start) 46 # Generate any missing host keys 47 ssh-keygen -A 48 echo -n "Starting SSH daemon" 49 ## Start daemon with startproc(8). If this fails 50 ## the echo return value is set appropriate. 51 |
52 startproc -f -p $SSHD_PIDFILE /usr/sbin/sshd $SSHD_OPTS -o "PidFile=$SSHD_PIDFILE" | 52 startproc -f -p $SSHD_PIDFILE $SSHD_BIN $SSHD_OPTS -o "PidFile=$SSHD_PIDFILE" |
53 54 # Remember status and be verbose 55 rc_status -v 56 ;; 57 stop) 58 echo -n "Shutting down SSH daemon" 59 ## Stop daemon with killproc(8) and if this fails 60 ## set echo the echo return value. 61 | 53 54 # Remember status and be verbose 55 rc_status -v 56 ;; 57 stop) 58 echo -n "Shutting down SSH daemon" 59 ## Stop daemon with killproc(8) and if this fails 60 ## set echo the echo return value. 61 |
62 killproc -p $SSHD_PIDFILE -TERM /usr/sbin/sshd | 62 killproc -p $SSHD_PIDFILE -TERM $SSHD_BIN |
63 64 # Remember status and be verbose 65 rc_status -v 66 ;; 67 try-restart) 68 ## Stop the service and if this succeeds (i.e. the 69 ## service was running before), start it again. 70 $0 status >/dev/null && $0 restart --- 11 unchanged lines hidden (view full) --- 82 rc_status 83 ;; 84 force-reload|reload) 85 ## Signal the daemon to reload its config. Most daemons 86 ## do this on signal 1 (SIGHUP). 87 88 echo -n "Reload service sshd" 89 | 63 64 # Remember status and be verbose 65 rc_status -v 66 ;; 67 try-restart) 68 ## Stop the service and if this succeeds (i.e. the 69 ## service was running before), start it again. 70 $0 status >/dev/null && $0 restart --- 11 unchanged lines hidden (view full) --- 82 rc_status 83 ;; 84 force-reload|reload) 85 ## Signal the daemon to reload its config. Most daemons 86 ## do this on signal 1 (SIGHUP). 87 88 echo -n "Reload service sshd" 89 |
90 killproc -p $SSHD_PIDFILE -HUP /usr/sbin/sshd | 90 killproc -p $SSHD_PIDFILE -HUP $SSHD_BIN |
91 92 rc_status -v 93 94 ;; 95 status) 96 echo -n "Checking for service sshd " 97 ## Check status with checkproc(8), if process is running 98 ## checkproc will return with exit status 0. 99 100 # Status has a slightly different for the status command: 101 # 0 - service running 102 # 1 - service dead, but /var/run/ pid file exists 103 # 2 - service dead, but /var/lock/ lock file exists 104 # 3 - service not running 105 | 91 92 rc_status -v 93 94 ;; 95 status) 96 echo -n "Checking for service sshd " 97 ## Check status with checkproc(8), if process is running 98 ## checkproc will return with exit status 0. 99 100 # Status has a slightly different for the status command: 101 # 0 - service running 102 # 1 - service dead, but /var/run/ pid file exists 103 # 2 - service dead, but /var/lock/ lock file exists 104 # 3 - service not running 105 |
106 checkproc -p $SSHD_PIDFILE /usr/sbin/sshd | 106 checkproc -p $SSHD_PIDFILE $SSHD_BIN |
107 108 rc_status -v 109 ;; 110 probe) 111 ## Optional: Probe for the necessity of a reload, 112 ## give out the argument which is required for a reload. 113 114 test /etc/ssh/sshd_config -nt $SSHD_PIDFILE && echo reload 115 ;; 116 *) 117 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 118 exit 1 119 ;; 120esac 121rc_exit | 107 108 rc_status -v 109 ;; 110 probe) 111 ## Optional: Probe for the necessity of a reload, 112 ## give out the argument which is required for a reload. 113 114 test /etc/ssh/sshd_config -nt $SSHD_PIDFILE && echo reload 115 ;; 116 *) 117 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 118 exit 1 119 ;; 120esac 121rc_exit |