Initial Commit
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
stop() {
|
||||
ufw disable
|
||||
|
||||
# Clear the trap
|
||||
trap - SIGINT SIGTERM
|
||||
kill -- -$(pgrep iptables.sh)
|
||||
}
|
||||
|
||||
ufw enable
|
||||
|
||||
# Run stop function when SIGINT or SIGTERM signals are caught
|
||||
trap "stop $1" SIGINT SIGTERM
|
||||
sleep infinity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user