diff options
Diffstat (limited to 'html/maintenance.php')
-rw-r--r-- | html/maintenance.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/html/maintenance.php b/html/maintenance.php index c74b924..60abea6 100644 --- a/html/maintenance.php +++ b/html/maintenance.php @@ -52,6 +52,15 @@ if (array_key_exists('machine',$_GET)) { die(); } +if (array_key_exists('ddns_machines', $_GET)) { + $ddns_tokens = file('/srv/http/vhosts/eckner.net/ddns/tokens'); + foreach ($ddns_tokens as $ddns_token) { + $db -> add_machine(explode(' ', $ddns_token, 2)[1]); + } + echo 'done.' . "\n"; + die(); +} + if (array_key_exists('ddns', $_GET)) { $result = $db -> query( 'SELECT keys.id FROM keys' . @@ -106,6 +115,7 @@ while ($row = $result -> fetchArray()) { ?> <h1>Global Tasks</h1> <a href="?ddns">ddns</a><br> +<a href="?ddns_machines">initialize machines from ddns tokens</a><br> <h1>Danger zone</h1> <a href="?drop=DROP">drop</a><br> </body></html> |