diff --git a/README.md b/README.md index 8991eac68bffcbfe6da6af2d891e0391502fbc8d..213002de9f68490f519934ff31089c03ca4971d9 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ touch add.log in location you configured in config.php ============================ -Source for https://podupti.me +Source for Diaspora Pod Uptime Poduptime is software to get live stats and data on listed Diaspora Pods. Copyright (C) 2011 David Morley diff --git a/api.php b/api.php index dd3125ef52bea7048c9389c19d666ef39d0c7cd9..8a00058f03b51efc7c6abe019e98395aa23e734c 100644 --- a/api.php +++ b/api.php @@ -17,8 +17,8 @@ if ($_format === 'georss') { Diaspora Pods -IP Locations of Diaspora pods on podupti.me - +IP Locations of Diaspora pods on {$_SERVER['HTTP_HOST']} + EOF; $sql = "SELECT * FROM pods WHERE hidden <> 'yes'"; diff --git a/db/add.php b/db/add.php index d3659e07d5fbeffa7b8b85043af19b7c2f1d2472..2fe12534b2f1c1820479b7dcfbd6045ea34842d5 100644 --- a/db/add.php +++ b/db/add.php @@ -1,9 +1,9 @@ lfile(__DIR__ . $log_dir . '/add.log'); +$log->lfile(__DIR__ . '/../' . $log_dir . '/add.log'); if (!($_domain = $_POST['domain'] ?? null)) { $log->lwrite('no domain given'); die('no pod domain given'); @@ -25,7 +25,6 @@ if (strlen($_url) < 14) { die('API key bad needs to be like m58978-80abdb799f6ccf15e3e3787ee'); } -require_once __DIR__ . '/../config.php'; $dbh = pg_connect("dbname=$pgdb user=$pguser password=$pgpass"); $dbh || die('Error in connection: ' . pg_last_error()); @@ -84,12 +83,12 @@ if ($valid) { $to = $adminemail; $cc = $_email; - $subject = 'New pod added to podupti.me '; + $subject = 'New pod added to '. $_SERVER['HTTP_HOST']; $message = sprintf( "%1\$s\n\nStats Url: %2\$s\n\nPod: %3\$s\n\n", - 'https://podupti.me', + 'https://' . $_SERVER['HTTP_HOST'], 'https://api.uptimerobot.com/getMonitors?format=json&customUptimeRatio=7-30-60-90&apiKey=' . $_url, - 'https://podupti.me/db/pull.php?debug=1&domain=' . $_domain + 'https://' . $_SERVER['HTTP_HOST'] . '/db/pull.php?debug=1&domain=' . $_domain ); $message .= 'Your pod will not show right away, needs to pass a few checks, Give it a few hours!'; $headers = 'From: ' . $_email . "\r\nReply-To: " . $_email . "\r\nCc: " . $_email . "\r\n"; diff --git a/db/gettoken.php b/db/gettoken.php index 78370f6cf9fb87d85c124c68e039b739877a49d8..5d78afd0d36e46c87a7c225a65be1e08bc598a11 100644 --- a/db/gettoken.php +++ b/db/gettoken.php @@ -30,8 +30,8 @@ while ($row = pg_fetch_array($result)) { $result || die('Error in SQL query: ' . pg_last_error()); $to = $_email; - $subject = 'Temporary edit key for podupti.me'; - $message = 'Link: https://podupti.me/db/edit.php?domain=' . $_domain . '&token=' . $uuid . ' Expires: ' . $expire . ' ' . $systemTimeZone . "\n\n"; + $subject = 'Temporary edit key for ' . $_SERVER['HTTP_HOST']; + $message = 'Link: https://' . $_SERVER['HTTP_HOST'] . '/db/edit.php?domain=' . $_domain . '&token=' . $uuid . ' Expires: ' . $expire . ' ' . $systemTimeZone . "\n\n"; $headers = "From: " . $adminemail . "\r\nBcc: " . $adminemail . "\r\n"; @mail($to, $subject, $message, $headers); echo 'Link sent to your email'; @@ -43,8 +43,8 @@ while ($row = pg_fetch_array($result)) { $result || die('Error in SQL query: ' . pg_last_error()); $to = $adminemail; - $subject = 'FORWARD REQUEST: Temporary edit key for podupti.me'; - $message = 'User trying to edit pod without email address. Email found: ' . $row['email'] . ' Link: https://podupti.me/db/edit.php?domain=' . $_domain . '&token=' . $uuid . ' Expires: ' . $expire . ' ' . $systemTimeZone . "\n\n"; + $subject = 'FORWARD REQUEST: Temporary edit key for ' . $_SERVER['HTTP_HOST']; + $message = 'User trying to edit pod without email address. Email found: ' . $row['email'] . ' Link: https://' . $_SERVER['HTTP_HOST'] . '/db/edit.php?domain=' . $_domain . '&token=' . $uuid . ' Expires: ' . $expire . ' ' . $systemTimeZone . "\n\n"; $headers = "From: " . $adminemail . "\r\nBcc: " . $adminemail . "\r\n"; @mail($to, $subject, $message, $headers); echo 'Link sent to administrator to review and verify, if approved they will forward the edit key to you.'; diff --git a/db/kill.php b/db/kill.php index fd0c98aafa1900c724c6b51ea53125936cc5be91..6d3da4e226d5c61dcf3c45a0ceed3a42f3d799cf 100644 --- a/db/kill.php +++ b/db/kill.php @@ -28,8 +28,8 @@ while ($row = pg_fetch_array($result)) { if ($row['email']) { $to = $row['email']; - $subject = 'Pod deleted from poduptime '; - $message = 'Pod ' . $_domain . ' was deleted from podupti.me as it was dead on the list. ' . $_comments . " Feel free to add back at any time. \n\n"; + $subject = 'Pod deleted from ' . $_SERVER['HTTP_HOST']; + $message = 'Pod ' . $_domain . ' was deleted from ' . $_SERVER['HTTP_HOST'] . ' as it was dead on the list. ' . $_comments . " Feel free to add back at any time. \n\n"; $headers = "From: " . $adminemail ."\r\nCc:" . $adminemail . "," . $row['email'] . "\r\n"; @mail($to, $subject, $message, $headers); } @@ -37,7 +37,7 @@ while ($row = pg_fetch_array($result)) { } elseif ($_action === 'warn') { if ($row['email']) { $to = $row['email']; - $subject = 'Pod removal warning from poduptime '; + $subject = 'Pod removal warning from ' . $_SERVER['HTTP_HOST']; $message = 'Pod ' . $_domain . ' is on the list to be deleted now because: ' . $_comments . ". \n\n Please let me know if you need help fixing before it is removed. \n\n"; $headers = "From: " . $adminemail ."\r\nCc:" . $adminemail . "," . $row['email'] . "\r\n"; @mail($to, $subject, $message, $headers); diff --git a/index.php b/index.php index 8568ed9cfe639ea9074b1f1d9e0594ecc0a9b401..b8b2e47d14fcce4ae55555425e7f1bf3fd350397 100644 --- a/index.php +++ b/index.php @@ -12,14 +12,14 @@ $simpleview = !($advancedview || $mapview || $cleanup || $podmin || $podminedi Diaspora Pod Uptime Status - Find your new social home on a hosted pod - + - + diff --git a/podmin.php b/podmin.php index 982193436da05d6e15324b3b2264cbccd2440669..40c9da9cb9c9788278767864cb930181120355c7 100644 --- a/podmin.php +++ b/podmin.php @@ -3,7 +3,7 @@ Want your pod listed?
Its easy start monitoring on your pod with a free Uptime Robot account.
Create a monitor for your pod, then in "My Settings" create a monitor-specific API key and paste below.

-
+


diff --git a/podminedit.php b/podminedit.php index a8f187da19e45e3747ecc9212a560a7180f84c3e..d3163616cd9ff7047ffa023e19ce9d7ec8eb7ce5 100644 --- a/podminedit.php +++ b/podminedit.php @@ -1,4 +1,4 @@ - +