Commit b3ca24f9 authored by David Morley's avatar David Morley

consistency

parent d28e1be0
......@@ -6,10 +6,10 @@
declare(strict_types=1);
//backup directory - full dir path
$backup_dir = '/backup';
$backup_dir = __DIR__ . '/backup';
//log directory - full dir path
$log_dir = '/log';
$log_dir = __DIR__ . '/log';
//location of pg dump - full dir path
$pg_dump_dir = '/usr/bin';
......
......@@ -240,10 +240,10 @@ foreach ($pods as $pod) {
_debug('Iplookupv6', $iplookupv6, true);
$geo = $reader->city($ip);
$countryname = $geo->country->name ?? null ?: 0;
$country = $geo->country->isoCode ?? null ?: 0;
$city = $geo->city->name ?? null ?: 0;
$state = $geo->mostSpecificSubdivision->name ?? null ?: 0;
$countryname = $geo->country->name ?? null ?: null;
$country = $geo->country->isoCode ?? null ?: null;
$city = $geo->city->name ?? null ?: null;
$state = $geo->mostSpecificSubdivision->name ?? null ?: null;
$lat = $geo->location->latitude ?? null ?: 0;
$long = $geo->location->longitude ?? null ?: 0;
......
......@@ -52,7 +52,7 @@ if [ "$HOUR" = 23 ] || [ "$@" = "init" ]; then
echo "$SAD"
fi
printf "%s" "Updating GeoIP2 DB..."
if funzip <(curl -L http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz) > ../GeoLite2-City.mmdb; then
if wget -qO- http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz | gunzip -c > ../GeoLite2-City.mmdb; then
echo "$HAPPY"
else
echo "$SAD"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment