summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-10-30 03:24:46 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-10-30 03:24:46 +0300
commitc07b810dc34a3f128241c1edf4cfe91f1e3cb34e (patch)
treeadaf8de27784a01d15490d4e24edb42bb612fb30
parente2164c15e356c9dfae0d94fc75200ef81f8c84cc (diff)
fix cf-nginx-wlHEADmaster
-rwxr-xr-xcf-nginx-wl.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/cf-nginx-wl.sh b/cf-nginx-wl.sh
index d7f67bb..3be2136 100755
--- a/cf-nginx-wl.sh
+++ b/cf-nginx-wl.sh
@@ -17,7 +17,8 @@ die() {
curl -s "https://www.cloudflare.com/ips-v4" --output "$TEMP" || die "downloading failed"
[ -s "$TEMP" ] || die "temp file is empty"
-cat "$TEMP" | sed 's/^/allow /g' | sed 's/$/;/g' | tee "$TEMP" > /dev/null
+sed -i 's/^/allow /g' "$TEMP"
+sed -i 's/$/;/g' "$TEMP"
echo -e "satisfy all;\n$(cat "$TEMP")" > "$TEMP"
echo "deny all;" >> "$TEMP"