Commit 2550cb09 authored by David Morley's avatar David Morley

allow for system deleted recheck and a dev run

parent ba16a022
......@@ -36,7 +36,10 @@ 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
run `db/pull.sh` manually or with cron to update your data
run `db/pull.sh debug` to debug output
run `db/pull.sh develop` to run without email alerts to end users
run `db/pull.sh Check_System_Deleted` to re-check system deleted pods as needed
To Upgrade:
```
......
......@@ -31,6 +31,9 @@ try {
if ($_domain) {
$sql .= ' WHERE domain = ?';
$pods = R::getAll($sql, [$_domain]);
} elseif (PHP_SAPI === 'cli' && (isset($argv) && in_array('Check_System_Deleted', $argv, true))) {
$sql .= ' WHERE status = ?';
$pods = R::getAll($sql, [PodStatus::System_Deleted]);
} elseif (PHP_SAPI === 'cli') {
$sql .= ' WHERE status < ?';
$pods = R::getAll($sql, [PodStatus::Paused]);
......@@ -241,7 +244,7 @@ foreach ($pods as $pod) {
$hidden = $score <= 70;
_debug('Hidden', $hidden ? 'yes' : 'no');
if (!$hiddennow && $hidden && $notify) {
if (!$hiddennow && $hidden && $notify && !(isset($argv) && in_array('develop', $argv, true))) {
$to = $email;
$headers = ['From: ' . $adminemail, 'Bcc: ' . $adminemail];
$subject = 'Monitoring notice from poduptime';
......
......@@ -52,7 +52,7 @@ if [ "$HOUR" = 23 ]; then
fi
echo "Pulling in new pod data...";
php pull.php $1
php pull.php $@
touch last.data
echo "Finished pull!"
......
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