fix cf-nginx-wl
This commit is contained in:
parent
e2164c15e3
commit
c07b810dc3
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user