mirror of
https://github.com/safing/portmaster
synced 2026-05-01 21:10:33 +00:00
Add recover-iptables sub-comment. Fixes #6
This commit is contained in:
parent
fe6af5f263
commit
7690793c66
2 changed files with 30 additions and 8 deletions
21
cmds/portmaster-start/recover_linux.go
Normal file
21
cmds/portmaster-start/recover_linux.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/safing/portmaster/firewall/interception"
|
||||
"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)
|
||||
},
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
recoverIPTablesCmd.Flags().BoolVarP(&recoverForceFlag, "force", "f", false, "Force removal ignoring errors")
|
||||
rootCmd.AddCommand(recoverIPTablesCmd)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue