Skip to content

Commit 2d26b45

Browse files
committed
Update trapping logic
1 parent 1dde6d4 commit 2d26b45

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

hardening/UFW Cloudflare/ufw-cloudflare.bash

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Sets up UFW to only allow HTTP and HTTPS traffic from Cloudflare's IP ranges.
44
#
5-
# Version: v1.0.0-beta.1
5+
# Version: v1.0.0-beta.2
66
# License: MIT License
77
# Copyright (c) 2024 Hunter T. (StrangeRanger)
88
#
@@ -139,10 +139,14 @@ cleanup() {
139139
}
140140

141141

142-
####[ Trap Logic ]######################################################################
142+
####[ Trapping Logic ]##################################################################
143143

144144

145-
trap cleanup EXIT
145+
trap 'clean_exit 130' SIGINT
146+
trap 'clean_exit 143' SIGTERM
147+
trap 'clean_exit 129' SIGHUP
148+
trap 'clean_exit 131' SIGQUIT
149+
trap 'clean_exit $?' EXIT
146150

147151

148152
####[ Main ]############################################################################

0 commit comments

Comments
 (0)