I've also tried adding refreshing of the database
This commit is contained in:
29
Docker/Dockerfile/updateIP2Lbin.sh
Executable file
29
Docker/Dockerfile/updateIP2Lbin.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -----------------------------
|
||||
# IP2Location DB1 Updater
|
||||
# -----------------------------
|
||||
|
||||
# Change this URL to your personal download link if needed
|
||||
DOWNLOAD_URL="https://www.ip2location.com/download/?token="$IP2LOC_TOKEN"&file=DB9LITEBIN"
|
||||
|
||||
# Define filenames
|
||||
ZIP_FILE="IP2LOCATION-LITE-DB9.BIN.ZIP"
|
||||
BIN_FILE="IP2LOCATION-LITE-DB9.BIN"
|
||||
|
||||
echo "Downloading latest IP2Location DB1..."
|
||||
wget -O "$CHOWNPATH"/"$BIN_FILE"
|
||||
|
||||
echo "Unzipping BIN file..."
|
||||
unzip -o "$ZIP_FILE"
|
||||
|
||||
if [ ! -f "$BIN_FILE" ]; then
|
||||
echo "Unzip failed or $BIN_FILE not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Cleaning up ZIP..."
|
||||
rm "$ZIP_FILE"
|
||||
|
||||
echo "Update complete. BIN file ready: $BIN_FILE"
|
||||
|
||||
Reference in New Issue
Block a user