diff --git a/openvpn-install.sh b/openvpn-install.sh index 45bc7df..f9d7dc5 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -84,14 +84,6 @@ This version of CentOS is too old and unsupported." exit 1 fi -if [ "$os" = "centos" ]; then - if grep -qs "hwdsl2 VPN script" /etc/sysconfig/nftables.conf \ - || systemctl is-active --quiet nftables 2>/dev/null; then - echo "This system has nftables enabled, which is not supported by this installer." - exit 1 - fi -fi - # Detect environments where $PATH does not include the sbin directories if ! grep -q sbin <<< "$PATH"; then echo '$PATH does not include sbin. Try using "su -" instead of "su".' @@ -129,6 +121,13 @@ new_client () { } if [[ ! -e /etc/openvpn/server/server.conf ]]; then + if [ "$os" = "centos" ]; then + if grep -qs "hwdsl2 VPN script" /etc/sysconfig/nftables.conf \ + || systemctl is-active --quiet nftables 2>/dev/null; then + echo "This system has nftables enabled, which is not supported by this installer." + exit 1 + fi + fi # Detect some Debian minimal setups where neither wget nor curl are installed if ! hash wget 2>/dev/null && ! hash curl 2>/dev/null; then echo "Wget is required to use this installer."