Merge pull request #1838 from pablobae/br2-fix-firewall-update-check-ssh-custom-port-rules-config-file

Update v-update-firewall
This commit is contained in:
Serghey Rodin 2019-05-14 10:26:04 +03:00 committed by GitHub
commit 855ba537cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,11 +51,6 @@ if [ $? -ne 0 ]; then
conntrack_ftp='no'
fi
# Checking custom OpenSSH port
sshport=$(grep '^Port ' /etc/ssh/sshd_config | head -1 | cut -d ' ' -f 2)
if [[ "$sshport" =~ ^[0-9]+$ ]] && [ "$sshport" -ne "22" ]; then
sed -i "s/PORT='22'/PORT=\'$sshport\'/" $rules
fi
# Creating temporary file
tmp=$(mktemp)