iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b95c44
)
move small script into work repo
author
Ian Kelling
<ian@iankelling.org>
Fri, 16 May 2025 01:53:45 +0000
(21:53 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Fri, 16 May 2025 01:53:45 +0000
(21:53 -0400)
iank-shorewall-fix
[deleted file]
patch
|
blob
|
history
diff --git
a/iank-shorewall-fix
b/iank-shorewall-fix
deleted file mode 100755
(executable)
index
6dc7b95
..0000000
--- a/
iank-shorewall-fix
+++ /dev/null
@@
-1,20
+0,0 @@
-#!/bin/bash
-
-set -xe
-
-home_ip=108.26.192.250
-a=$(md5sum /etc/shorewall/rules)
-l="ACCEPT net:$home_ip fw tcp ssh # iank"
-sed -ri "s/^.*[[:space:]]ssh[[:space:]]*# *iank *$/$l/" /etc/shorewall/rules
-if ! grep -qF $home_ip /etc/shorewall/rules; then
- echo "
-
-############## ############# ERROR SED FAILED!!!################
-
-"
-fi
-b=$(md5sum /etc/shorewall/rules)
-if [[ $a != "$b" ]]; then
- echo "diff:$a $b"
- shorewall restart
-fi