Try as hard as possible to remove the nfqueue rules

This commit is contained in:
Patrick Pacher
2020-07-17 11:21:09 +02:00
parent 6d69039c20
commit 9eb7195bd8
2 changed files with 42 additions and 86 deletions

View File

@@ -5,17 +5,15 @@ import (
"github.com/spf13/cobra"
)
var recoverForceFlag bool
var recoverIPTablesCmd = &cobra.Command{
Use: "recover-iptables",
Short: "Removes obsolete IP tables rules in case of an unclean shutdown",
RunE: func(*cobra.Command, []string) error {
return interception.DeactivateNfqueueFirewall(recoverForceFlag)
return interception.DeactivateNfqueueFirewall()
},
SilenceUsage: true,
}
func init() {
recoverIPTablesCmd.Flags().BoolVarP(&recoverForceFlag, "force", "f", false, "Force removal ignoring errors")
rootCmd.AddCommand(recoverIPTablesCmd)
}