| | |
| | | function restartBind($action = 'restart') { |
| | | global $app,$conf; |
| | | |
| | | $app->uses('system'); |
| | | |
| | | $daemon = ''; |
| | | if(is_file($conf['init_scripts'] . '/' . 'bind9')) { |
| | | $daemon = 'bind9'; |
| | |
| | | |
| | | $retval = array('output' => '', 'retval' => 0); |
| | | if($action == 'restart') { |
| | | exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']); |
| | | exec($app->system->getinitcommand($daemon, 'restart').' 2>&1', $retval['output'], $retval['retval']); |
| | | } else { |
| | | exec($conf['init_scripts'] . '/' . $daemon . ' reload 2>&1', $retval['output'], $retval['retval']); |
| | | exec($app->system->getinitcommand($daemon, 'reload').' 2>&1', $retval['output'], $retval['retval']); |
| | | } |
| | | return $retval; |
| | | } |
| | |
| | | function restartPowerDNS($action = 'restart') { |
| | | global $app,$conf; |
| | | |
| | | $app->uses('system'); |
| | | $app->log("restartPDNS called.",LOGLEVEL_DEBUG); |
| | | |
| | | /** Since PowerDNS does not currently allow to limit AXFR for specific zones to specific |
| | |
| | | } |
| | | |
| | | $retval = array('output' => '', 'retval' => 0); |
| | | exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']); |
| | | exec($app->system->getinitcommand($daemon, 'restart').' 2>&1', $retval['output'], $retval['retval']); |
| | | |
| | | // unset $tmps; |
| | | return $retval; |