Initial Commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
name: ufw
|
||||
description: Start the Uncomplicated FireWall
|
||||
type: background
|
||||
start_cmd: /etc/esvm/scripts/ufw.sh
|
||||
exit_method: kill
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 1c0e620..9cae679 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -54,7 +54,7 @@ class Install(_install, object):
|
||||
return
|
||||
|
||||
real_confdir = os.path.join('/etc')
|
||||
- real_statedir = os.path.join('/lib', 'ufw')
|
||||
+ real_statedir = os.path.join('/usr/lib', 'ufw')
|
||||
real_prefix = self.prefix
|
||||
if self.home != None:
|
||||
real_confdir = self.home + real_confdir
|
||||
Reference in New Issue
Block a user