diff options
-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" |