diff --git a/gnome-shell/firewall@subgraph.com/metadata.json b/gnome-shell/firewall@subgraph.com/metadata.json index 35b30b3..c6c92fe 100644 --- a/gnome-shell/firewall@subgraph.com/metadata.json +++ b/gnome-shell/firewall@subgraph.com/metadata.json @@ -1,6 +1,6 @@ { "description": "Firewall Extension", - "shell-version": ["3.18"], + "shell-version": ["3.18", "3.20"], "uuid": "firewall@subgraph.com", "name": "Firewall Extension", "settings-schema": "com.subgraph.firewall" diff --git a/main.go b/main.go index f3a17e8..257decb 100644 --- a/main.go +++ b/main.go @@ -111,8 +111,11 @@ func (fw *Firewall) runFilter() { q.Timeout = 5 * time.Minute packets := q.Process() - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, os.Interrupt, os.Kill) + sigKillChan := make(chan os.Signal, 1) + signal.Notify(sigKillChan, os.Interrupt, os.Kill) + + sigHupChan := make(chan os.Signal, 1) + signal.Notify(sigHupChan, syscall.SIGHUP) for { select { @@ -122,7 +125,9 @@ func (fw *Firewall) runFilter() { } else { pkt.Accept() } - case <-sigs: + case <-sigHupChan: + fw.loadRules() + case <-sigKillChan: return } }