We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2296f1c commit aa1e28cCopy full SHA for aa1e28c
bin/v-add-firewall-ipset
@@ -116,6 +116,7 @@ if [ ! -f "${IPSET_PATH}/${IPSET_FILE}.iplist" ] || [ "$force" = "yes" ]; then
116
fi
117
118
# Cleanup ip list
119
+ sed -r -i -e 's/[;#].*$//' -e 's/[ \t]*$//' -e '/^$/d' "$iplist_tempfile"
120
if [[ $ip_version == 'v4' ]]; then
121
sed -i -r -n -e '/^((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/p' "$iplist_tempfile"
122
elif [[ $ip_version == 'v6' ]]; then
0 commit comments