mystic/ip2location/install-v2.sh
2024-04-21 07:45:51 +02:00

15 lines
708 B
Bash

if [ $IP2L = "Yes" ]; then
msg_info "Setting up IP2Location Download Client for ${APP}"
apt install -y libwww-perl &>/dev/null
wget -N https://www.ip2location.com/downloads/ip2location-downloader-linux.zip -O $MSTEMPDIR/ip2location-downloader-linux.zip &>/dev/null
rm -rf $MSTEMPDIR/ip2location-downloader-linux &>/dev/null
mkdir -p $MSTEMPDIR/ip2location-downloader-linux &>/dev/null
pushd $MSTEMPDIR/ip2location-downloader-linux &>/dev/null
unzip ../ip2location-downloader-linux.zip &>/dev/null
cp download.pl ${MYSTIC_DIR}/ip2location
chmod +x ${MYSTIC_DIR}/ip2location
cp readme.txt ${MYSTIC_DIR}/docs/ip2location_README.txt
popd &>/dev/null
msg_ok "Setting up IP2Location Download Client for ${APP}"
fi