Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Mikki-10/cache-domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikki-10 committed Mar 12, 2018
2 parents 6d44079 + 6534c8f commit 35d6afc
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion scripts/lib/cli_mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@ class cli_mode

function __construct()
{
$this->run();
if (isset($_SERVER['argv'][1]) && isset($_SERVER['argv'][2]) && isset($_SERVER['argv'][3]) && isset($_SERVER['argv'][4]))
{
$server = $_SERVER['argv'][1];
$dns_service = array('dns_service' => $_SERVER['argv'][2]);
$output_mode = array('filetype' => $_SERVER['argv'][3]);
$services = explode(" ", $_SERVER['argv'][4l]);

foreach ($services as $key => $service)
{
$services[$key] = trim($service, " \t\n\r\0\x0B");
}

$this->make_conf($dns_service, $output_mode, $services, $server);
}
else
{
$this->run();
}
}

function run()
Expand Down

0 comments on commit 35d6afc

Please sign in to comment.