#
## Download latest versions of GeoIP2 databases and extract database files
#sudo wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-
City.tar.gz >> ${INSTALL_LOG_FILE_PATH} 2>&1 && \
# sudo tar -xzf $GEOIP1_DB_TAR
$GEOIP1_DB_FOLDER/$GEOIP1_DB_FILE --strip-components 1 >>
${INSTALL_LOG_FILE_PATH} 2>&1
#sudo wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-
Country.tar.gz >> ${INSTALL_LOG_FILE_PATH} 2>&1 && \
# sudo tar -zxf $GEOIP2_DB_TAR
$GEOIP2_DB_FOLDER/$GEOIP2_DB_FILE --strip-components 1 >>
${INSTALL_LOG_FILE_PATH} 2>&1
#
## Move GeoIP2 database files to NGINX config directory and remove .tar.gz
archives
#sudo mv *.mmdb /etc/nginx/geoip2 >> ${INSTALL_LOG_FILE_PATH}
2>&1
#sudo rm *.tar.gz |& tee >> ${INSTALL_LOG_FILE_PATH} 2>&1
echo "$(date +"%d-%b-%Y-%H-%M-%S") | Configuring firewall app
profile..." |& tee -a ${INSTALL_LOG_FILE_PATH}
# Move the UFW app profile uploaded by the previous script to
# the correct location. UFW is disabled by default
sudo mv ${DEB_PKG_FOLDER_PATH}/nginx
/etc/ufw/applications.d/nginx
echo "$(date +"%d-%b-%Y-%H-%M-%S") | Configuring systemd unit file..."
|& tee -a ${INSTALL_LOG_FILE_PATH}
# Move the file to correct location so NGINX can be started,
# stopped and reloaded with global commands