Skip to content

Commit

Permalink
Merge pull request #140 from jens-mp/check_iptables_persistent_with_dpkg
Browse files Browse the repository at this point in the history
Check iptables persistent with dpkg
  • Loading branch information
mgmgwi committed Jun 24, 2024
2 parents 95b8971 + a414781 commit 0dd6ac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/ip_tables_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ip_tables_installed() {
}

ip_tables_persistent_installed() {
if which iptables-save 2>/dev/null 1>&2; then
if dpkg-query -W --showformat='${Status}' iptables-persistent | grep "install ok installed" 2>/dev/null 1>&2; then
return 0
fi
return 1
Expand Down

0 comments on commit 0dd6ac6

Please sign in to comment.