private function _call(Modules_SlaveDnsManager_Slave $slave, $arguments, $verbose = false) { $arguments = "-c \"{$slave->getConfigPath()}\" {$arguments} 2>&1"; if (pm_ProductInfo::isWindows()) { $command = '"' . PRODUCT_ROOT . '\\dns\\bin\\rndc.exe"'; } else { $command = '/usr/sbin/rndc'; } exec("{$command} {$arguments}", $out, $code); $output = implode("\n", $out); if ($verbose) { if ($code != 0) { throw new pm_Exception("Error code {$code}: {$output}"); } return $output; } if ($code != 0) { // Cannot send output header due to possible API-RPC calls error_log("Error code {$code}: {$output}"); } return $code == 0; }
<?php // Copyright 1999-2014. Parallels IP Holdings GmbH. All Rights Reserved. if (pm_ProductInfo::isWindows()) { if (!file_exists(PRODUCT_ROOT . '\\dns\\bin\\rndc.exe')) { echo "BIND DNS Server is not installed."; exit(1); } }