Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / etc / network / if-up.d / | server ip : 104.21.89.46 your ip : 172.69.214.217 H O M E |
Filename | /etc/network/if-up.d/openssh-server |
Size | 755 |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 09:57 |
Last modified | 14-Apr-2014 19:11 |
Last accessed | 06-Jul-2025 18:34 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#! /bin/sh
# Reload the OpenSSH server when an interface comes up, to allow it to start
# listening on new addresses.
set -e
# Don't bother to restart sshd when lo is configured.
if [ "$IFACE" = lo ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
# OpenSSH only cares about inet and inet6. Get ye gone, strange people
# still using ipx.
if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
exit 0
fi
# Is /usr mounted?
if [ ! -e /usr/sbin/sshd ]; then
exit 0
fi
if [ ! -f /var/run/sshd.pid ] || \
[ "$(ps -p "$(cat /var/run/sshd.pid)" -o comm=)" != sshd ]; then
exit 0
fi
# We'd like to use 'reload' here, but it has some problems; see
# #502444.
invoke-rc.d ssh restart >/dev/null 2>&1 || true
exit 0
# Reload the OpenSSH server when an interface comes up, to allow it to start
# listening on new addresses.
set -e
# Don't bother to restart sshd when lo is configured.
if [ "$IFACE" = lo ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
# OpenSSH only cares about inet and inet6. Get ye gone, strange people
# still using ipx.
if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
exit 0
fi
# Is /usr mounted?
if [ ! -e /usr/sbin/sshd ]; then
exit 0
fi
if [ ! -f /var/run/sshd.pid ] || \
[ "$(ps -p "$(cat /var/run/sshd.pid)" -o comm=)" != sshd ]; then
exit 0
fi
# We'd like to use 'reload' here, but it has some problems; see
# #502444.
invoke-rc.d ssh restart >/dev/null 2>&1 || true
exit 0