diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-10-30 03:24:46 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-10-30 03:24:46 +0300 |
commit | c07b810dc34a3f128241c1edf4cfe91f1e3cb34e (patch) | |
tree | adaf8de27784a01d15490d4e24edb42bb612fb30 | |
parent | e2164c15e356c9dfae0d94fc75200ef81f8c84cc (diff) |
-rwxr-xr-x | cf-nginx-wl.sh | 3 |
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" |