From c07b810dc34a3f128241c1edf4cfe91f1e3cb34e Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 30 Oct 2023 03:24:46 +0300 Subject: fix cf-nginx-wl --- cf-nginx-wl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3