Commit 88b1997e authored by David Morley's avatar David Morley Committed by GitHub

Fixpullnbackup (#79)

* fixes for issue 63

* example

* add install note

* quotes

* Fixpullnbackup fixes (#81)

* Fix a few warnings and correct data type for boolean variables.

* Boolean data type for $dnssec, $signup and $ipv6.
Use only $signup instead of also $registrations_open.
Use only $outputssl instead of also $outputresults.

* Weird PSQL requires boolean to be passed as int, else it gives an error: `invalid input syntax for type boolean: ""`

* Remove unnecessary unsets.

* Remove unnecessary foreach loop.

* Fix alignment (visual only).
[skip ci]

* To determine if the request was successful, check for a valid JSON to parse instead of searching the response for a string.

* Rename query result variables to prevent breaking the main loop.

* Add a small debug function to make debug output cleaner and easier to use.

* Add debug flag. Browser: `pull.php?debug`, CLI: `pull.php debug`

* Remove old code that prevents markers from overlapping each other, as mapbox nicely separates them.
parent b5537788
......@@ -42,6 +42,7 @@ psql -u podupuser podupdb < db/tables.sql
Edit `config.php` to add your DB and file settings.
touch add.log in location you configured in config.php
run db/pull.sh manually or with cron to update your data
============================
......
This diff is collapsed.
WGET="/usr/bin/wget"
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
if [ -s /tmp/index.google ];then
echo "already running die"
exit;
......@@ -6,8 +7,7 @@ else
echo "Checking for internet";
fi
$WGET -q --tries=10 --timeout=15 http://www.google.com -O /tmp/index.google
# &> /dev/null
wget -q --tries=2 --timeout=15 http://www.google.com -O /tmp/index.google
sleep 2
if [ ! -s /tmp/index.google ];then
......@@ -16,8 +16,8 @@ if [ ! -s /tmp/index.google ];then
exit;
else
echo "Pulling in new pod data";
cd /var/www/poduptime/db
php pull.php debug=1
cd "$SCRIPT_DIR"
php pull.php
touch last.data
php backup.php
rm /tmp/index.google
......
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