2 # Reload the OpenSSH server when an interface comes up, to allow it to start
3 # listening on new addresses.
7 # Don't bother to restart sshd when lo is configured.
8 if [ "$IFACE" = lo ]; then
13 if [ "$MODE" != start ]; then
17 # OpenSSH only cares about inet and inet6. Get ye gone, strange people
19 if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
24 if [ ! -e /usr/sbin/sshd ]; then
28 if [ ! -f /var/run/sshd.pid ] || \
29 [ "$(ps -p "$(cat /var/run/sshd.pid)" -o comm=)" != sshd ]; then
33 # We'd like to use 'reload' here, but it has some problems; see #502444.
34 if [ -x /usr/sbin/invoke-rc.d ]; then
35 invoke-rc.d ssh restart >/dev/null 2>&1 || true
37 /etc/init.d/ssh restart >/dev/null 2>&1 || true