- if [ -f /var/lock/subsys/sshd ]; then
- msg_stopping "OpenSSH"
- # we use start-stop-daemon to stop sshd, as it is unacceptable for such
- # critical service as sshd to kill it by procname, but unfortunately
- # rc-scripts does not provide way to kill *only* by pidfile
- start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid && ok || fail
- rm -f /var/lock/subsys/sshd >/dev/null 2>&1
- else
+ if [ ! -f /var/lock/subsys/sshd ]; then
+ msg_not_running "OpenSSH"
+ return
+ fi
+
+ msg_stopping "OpenSSH"
+ # we use start-stop-daemon to stop sshd, as it is unacceptable for such
+ # critical service as sshd to kill it by procname, but unfortunately
+ # rc-scripts does not provide way to kill *only* by pidfile
+ start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid && ok || fail
+ rm -f /var/lock/subsys/sshd >/dev/null 2>&1
+}
+
+reload() {
+ if [ ! -f /var/lock/subsys/sshd ]; then