set default dns server in config-templates; separate CmdLineHandler from switch-server-ip script for further usage
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -17,42 +17,29 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Check if we're in the CLI
|
// Check if we're in the CLI
|
||||||
if(@php_sapi_name() !== 'cli') {
|
if (@php_sapi_name() !== 'cli') {
|
||||||
die('This script will only work in the shell.');
|
die('This script will only work in the shell.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// give control to command line handler
|
require dirname(dirname(__DIR__)) . '/lib/classes/output/class.CmdLineHandler.php';
|
||||||
try {
|
|
||||||
CmdLineHandler::processParameters($argc, $argv);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
CmdLineHandler::printerr($e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
class CmdLineHandler
|
class SwitchServerIp extends CmdLineHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* internal variable for passed arguments
|
* list of valid switches
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $args = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Action object read from commandline/config
|
|
||||||
*
|
|
||||||
* @var Action
|
|
||||||
*/
|
|
||||||
private $_action = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* list of valid parameters/switches
|
|
||||||
*/
|
|
||||||
public static $switches = array(
|
public static $switches = array(
|
||||||
/* 'd', // debug / output information for everything */
|
|
||||||
'h'
|
'h'
|
||||||
);
|
);
|
||||||
// same as --help
|
|
||||||
|
/**
|
||||||
|
* list of valid parameters
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
public static $params = array(
|
public static $params = array(
|
||||||
'switch',
|
'switch',
|
||||||
'list',
|
'list',
|
||||||
@@ -60,131 +47,7 @@ class CmdLineHandler
|
|||||||
'help'
|
'help'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
public static $action_class = 'Action';
|
||||||
* Returns a CmdLineHandler object with given
|
|
||||||
* arguments from command line
|
|
||||||
*
|
|
||||||
* @param int $argc
|
|
||||||
* @param array $argv
|
|
||||||
*
|
|
||||||
* @return CmdLineHandler
|
|
||||||
*/
|
|
||||||
public static function processParameters($argc, $argv)
|
|
||||||
{
|
|
||||||
return new CmdLineHandler($argc, $argv);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* returns the Action object generated in
|
|
||||||
* the class constructor
|
|
||||||
*
|
|
||||||
* @return Action
|
|
||||||
*/
|
|
||||||
public function getAction()
|
|
||||||
{
|
|
||||||
return $this->_action;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* class constructor, validates the command line parameters
|
|
||||||
* and sets the Action-object if valid
|
|
||||||
*
|
|
||||||
* @param int $argc
|
|
||||||
* @param string[] $argv
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
private function __construct($argc, $argv)
|
|
||||||
{
|
|
||||||
self::$args = $this->_parseArgs($argv);
|
|
||||||
$this->_action = $this->_createAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parses the arguments given via the command line;
|
|
||||||
* three types are supported:
|
|
||||||
* 1.
|
|
||||||
* --parm1 or --parm2=value
|
|
||||||
* 2. -xyz (multiple switches in one) or -a=value
|
|
||||||
* 3. parm1 parm2
|
|
||||||
*
|
|
||||||
* The 1. will be mapped as
|
|
||||||
* ["parm1"] => true, ["parm2"] => "value"
|
|
||||||
* The 2. as
|
|
||||||
* ["x"] => true, ["y"] => true, ["z"] => true, ["a"] => "value"
|
|
||||||
* And the 3. as
|
|
||||||
* [0] => "parm1", [1] => "parm2"
|
|
||||||
*
|
|
||||||
* @param array $argv
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function _parseArgs($argv)
|
|
||||||
{
|
|
||||||
array_shift($argv);
|
|
||||||
$o = array();
|
|
||||||
foreach ($argv as $a) {
|
|
||||||
if (substr($a, 0, 2) == '--') {
|
|
||||||
$eq = strpos($a, '=');
|
|
||||||
if ($eq !== false) {
|
|
||||||
$o[substr($a, 2, $eq - 2)] = substr($a, $eq + 1);
|
|
||||||
} else {
|
|
||||||
$k = substr($a, 2);
|
|
||||||
if (! isset($o[$k])) {
|
|
||||||
$o[$k] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if (substr($a, 0, 1) == '-') {
|
|
||||||
if (substr($a, 2, 1) == '=') {
|
|
||||||
$o[substr($a, 1, 1)] = substr($a, 3);
|
|
||||||
} else {
|
|
||||||
foreach (str_split(substr($a, 1)) as $k) {
|
|
||||||
if (! isset($o[$k])) {
|
|
||||||
$o[$k] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$o[] = $a;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $o;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an Action-Object for the Action-Handler
|
|
||||||
*
|
|
||||||
* @return Action
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
private function _createAction()
|
|
||||||
{
|
|
||||||
|
|
||||||
// Test for help-switch
|
|
||||||
if (empty(self::$args) || array_key_exists("help", self::$args) || array_key_exists("h", self::$args)) {
|
|
||||||
self::printHelp();
|
|
||||||
// end of execution
|
|
||||||
}
|
|
||||||
// check if no unknown parameters are present
|
|
||||||
foreach (self::$args as $arg => $value) {
|
|
||||||
|
|
||||||
if (is_numeric($arg)) {
|
|
||||||
throw new Exception("Unknown parameter '" . $value . "' in argument list");
|
|
||||||
} elseif (! in_array($arg, self::$params) && ! in_array($arg, self::$switches)) {
|
|
||||||
throw new Exception("Unknown parameter '" . $arg . "' in argument list");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// set debugger switch
|
|
||||||
if (isset(self::$args["d"]) && self::$args["d"] == true) {
|
|
||||||
// Debugger::getInstance()->setEnabled(true);
|
|
||||||
// Debugger::getInstance()->debug("debug output enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Action(self::$args);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function printHelp()
|
public static function printHelp()
|
||||||
{
|
{
|
||||||
@@ -210,31 +73,6 @@ class CmdLineHandler
|
|||||||
|
|
||||||
die(); // end of execution
|
die(); // end of execution
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function println($msg = "")
|
|
||||||
{
|
|
||||||
print $msg . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function _printcolor($msg = "", $color = "0")
|
|
||||||
{
|
|
||||||
print "\033[" . $color . "m" . $msg . "\033[0m" . PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function printerr($msg = "")
|
|
||||||
{
|
|
||||||
self::_printcolor($msg, "31");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function printsucc($msg = "")
|
|
||||||
{
|
|
||||||
self::_printcolor($msg, "32");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function printwarn($msg = "")
|
|
||||||
{
|
|
||||||
self::_printcolor($msg, "33");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Action
|
class Action
|
||||||
@@ -391,10 +229,10 @@ class Action
|
|||||||
private function _parseConfig()
|
private function _parseConfig()
|
||||||
{
|
{
|
||||||
define('FROXLOR_INSTALL_DIR', $this->_args['froxlor-dir']);
|
define('FROXLOR_INSTALL_DIR', $this->_args['froxlor-dir']);
|
||||||
if (!file_exists(FROXLOR_INSTALL_DIR . '/lib/classes/database/class.Database.php')) {
|
if (! file_exists(FROXLOR_INSTALL_DIR . '/lib/classes/database/class.Database.php')) {
|
||||||
throw new Exception("Could not find froxlor's Database class. Is froxlor really installed to '".FROXLOR_INSTALL_DIR."'?");
|
throw new Exception("Could not find froxlor's Database class. Is froxlor really installed to '" . FROXLOR_INSTALL_DIR . "'?");
|
||||||
}
|
}
|
||||||
if (!file_exists(FROXLOR_INSTALL_DIR . '/lib/userdata.inc.php')) {
|
if (! file_exists(FROXLOR_INSTALL_DIR . '/lib/userdata.inc.php')) {
|
||||||
throw new Exception("Could not find froxlor's userdata.inc.php file. You should use this script only with a fully installed and setup froxlor system.");
|
throw new Exception("Could not find froxlor's userdata.inc.php file. You should use this script only with a fully installed and setup froxlor system.");
|
||||||
}
|
}
|
||||||
require FROXLOR_INSTALL_DIR . '/lib/classes/database/class.Database.php';
|
require FROXLOR_INSTALL_DIR . '/lib/classes/database/class.Database.php';
|
||||||
@@ -415,3 +253,10 @@ class Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// give control to command line handler
|
||||||
|
try {
|
||||||
|
SwitchServerIp::processParameters($argc, $argv);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
SwitchServerIp::printerr($e->getMessage());
|
||||||
|
}
|
||||||
|
|||||||
196
lib/classes/output/class.CmdLineHandler.php
Normal file
196
lib/classes/output/class.CmdLineHandler.php
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2018 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2018-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Cron
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class CmdLineHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* internal variable for passed arguments
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private static $args = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action object read from commandline/config
|
||||||
|
*
|
||||||
|
* @var Action
|
||||||
|
*/
|
||||||
|
private $_action = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a CmdLineHandler object with given
|
||||||
|
* arguments from command line
|
||||||
|
*
|
||||||
|
* @param int $argc
|
||||||
|
* @param array $argv
|
||||||
|
*
|
||||||
|
* @return CmdLineHandler
|
||||||
|
*/
|
||||||
|
public static function processParameters($argc, $argv)
|
||||||
|
{
|
||||||
|
$me = get_called_class();
|
||||||
|
return new $me($argc, $argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the Action object generated in
|
||||||
|
* the class constructor
|
||||||
|
*
|
||||||
|
* @return Action
|
||||||
|
*/
|
||||||
|
public function getAction()
|
||||||
|
{
|
||||||
|
return $this->_action;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class constructor, validates the command line parameters
|
||||||
|
* and sets the Action-object if valid
|
||||||
|
*
|
||||||
|
* @param int $argc
|
||||||
|
* @param string[] $argv
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private function __construct($argc, $argv)
|
||||||
|
{
|
||||||
|
self::$args = $this->_parseArgs($argv);
|
||||||
|
$this->_action = $this->_createAction();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses the arguments given via the command line;
|
||||||
|
* three types are supported:
|
||||||
|
* 1.
|
||||||
|
* --parm1 or --parm2=value
|
||||||
|
* 2. -xyz (multiple switches in one) or -a=value
|
||||||
|
* 3. parm1 parm2
|
||||||
|
*
|
||||||
|
* The 1. will be mapped as
|
||||||
|
* ["parm1"] => true, ["parm2"] => "value"
|
||||||
|
* The 2. as
|
||||||
|
* ["x"] => true, ["y"] => true, ["z"] => true, ["a"] => "value"
|
||||||
|
* And the 3. as
|
||||||
|
* [0] => "parm1", [1] => "parm2"
|
||||||
|
*
|
||||||
|
* @param array $argv
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function _parseArgs($argv)
|
||||||
|
{
|
||||||
|
array_shift($argv);
|
||||||
|
$o = array();
|
||||||
|
foreach ($argv as $a) {
|
||||||
|
if (substr($a, 0, 2) == '--') {
|
||||||
|
$eq = strpos($a, '=');
|
||||||
|
if ($eq !== false) {
|
||||||
|
$o[substr($a, 2, $eq - 2)] = substr($a, $eq + 1);
|
||||||
|
} else {
|
||||||
|
$k = substr($a, 2);
|
||||||
|
if (! isset($o[$k])) {
|
||||||
|
$o[$k] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (substr($a, 0, 1) == '-') {
|
||||||
|
if (substr($a, 2, 1) == '=') {
|
||||||
|
$o[substr($a, 1, 1)] = substr($a, 3);
|
||||||
|
} else {
|
||||||
|
foreach (str_split(substr($a, 1)) as $k) {
|
||||||
|
if (! isset($o[$k])) {
|
||||||
|
$o[$k] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$o[] = $a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $o;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an Action-Object for the Action-Handler
|
||||||
|
*
|
||||||
|
* @return Action
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private function _createAction()
|
||||||
|
{
|
||||||
|
|
||||||
|
// Test for help-switch
|
||||||
|
if (empty(self::$args) || array_key_exists("help", self::$args) || array_key_exists("h", self::$args)) {
|
||||||
|
static::printHelp();
|
||||||
|
// end of execution
|
||||||
|
}
|
||||||
|
// check if no unknown parameters are present
|
||||||
|
foreach (self::$args as $arg => $value) {
|
||||||
|
|
||||||
|
if (is_numeric($arg)) {
|
||||||
|
throw new Exception("Unknown parameter '" . $value . "' in argument list");
|
||||||
|
} elseif (! in_array($arg, static::$params) && ! in_array($arg, static::$switches)) {
|
||||||
|
throw new Exception("Unknown parameter '" . $arg . "' in argument list");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set debugger switch
|
||||||
|
if (isset(self::$args["d"]) && self::$args["d"] == true) {
|
||||||
|
// Debugger::getInstance()->setEnabled(true);
|
||||||
|
// Debugger::getInstance()->debug("debug output enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
return new static::$action_class(self::$args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getInput($prompt = "#", $default = "")
|
||||||
|
{
|
||||||
|
if (! empty($default)) {
|
||||||
|
$prompt .= " [" . $default . "]";
|
||||||
|
}
|
||||||
|
$result = readline($prompt . ":");
|
||||||
|
if (empty($result) && ! empty($default)) {
|
||||||
|
$result = $default;
|
||||||
|
}
|
||||||
|
return mb_strtolower($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function println($msg = "")
|
||||||
|
{
|
||||||
|
print $msg . PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function _printcolor($msg = "", $color = "0")
|
||||||
|
{
|
||||||
|
print "\033[" . $color . "m" . $msg . "\033[0m" . PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function printerr($msg = "")
|
||||||
|
{
|
||||||
|
self::_printcolor($msg, "31");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function printsucc($msg = "")
|
||||||
|
{
|
||||||
|
self::_printcolor($msg, "32");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function printwarn($msg = "")
|
||||||
|
{
|
||||||
|
self::_printcolor($msg, "33");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -353,7 +353,7 @@ exit "$RETVAL"
|
|||||||
<!--DNS -->
|
<!--DNS -->
|
||||||
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
||||||
<!--Bind9 -->
|
<!--Bind9 -->
|
||||||
<daemon name="bind" title="Bind9 nameserver">
|
<daemon name="bind" title="Bind9 nameserver" default="true">
|
||||||
<install><![CDATA[emerge net-dns/bind]]></install>
|
<install><![CDATA[emerge net-dns/bind]]></install>
|
||||||
<file name="/etc/bind/default.zone">
|
<file name="/etc/bind/default.zone">
|
||||||
<content><![CDATA[
|
<content><![CDATA[
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ exit "$RETVAL"
|
|||||||
<!--DNS -->
|
<!--DNS -->
|
||||||
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
||||||
<!--Bind9 -->
|
<!--Bind9 -->
|
||||||
<daemon name="bind" title="Bind9 nameserver">
|
<daemon name="bind" title="Bind9 nameserver" default="true">
|
||||||
<install><![CDATA[apt-get install bind9]]></install>
|
<install><![CDATA[apt-get install bind9]]></install>
|
||||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
||||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ exit "$RETVAL"
|
|||||||
<!--DNS -->
|
<!--DNS -->
|
||||||
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
||||||
<!--Bind9 -->
|
<!--Bind9 -->
|
||||||
<daemon name="bind" title="Bind9 nameserver">
|
<daemon name="bind" title="Bind9 nameserver" default="true">
|
||||||
<install><![CDATA[apt-get install bind9]]></install>
|
<install><![CDATA[apt-get install bind9]]></install>
|
||||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
||||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ exit "$RETVAL"
|
|||||||
<!--DNS -->
|
<!--DNS -->
|
||||||
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
||||||
<!--Bind9 -->
|
<!--Bind9 -->
|
||||||
<daemon name="bind" title="Bind9 nameserver">
|
<daemon name="bind" title="Bind9 nameserver" default="true">
|
||||||
<install><![CDATA[apt-get install bind9]]></install>
|
<install><![CDATA[apt-get install bind9]]></install>
|
||||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
||||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ exit "$RETVAL"
|
|||||||
<!--DNS -->
|
<!--DNS -->
|
||||||
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
||||||
<!--Bind9 -->
|
<!--Bind9 -->
|
||||||
<daemon name="bind" title="Bind9 nameserver">
|
<daemon name="bind" title="Bind9 nameserver" default="true">
|
||||||
<install><![CDATA[apt-get install bind9]]></install>
|
<install><![CDATA[apt-get install bind9]]></install>
|
||||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
|
||||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ exit "$RETVAL"
|
|||||||
<!--DNS -->
|
<!--DNS -->
|
||||||
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
<service type="dns" title="{{lng.admin.configfiles.dns}}">
|
||||||
<!--Bind9 -->
|
<!--Bind9 -->
|
||||||
<daemon name="bind" title="Bind9 nameserver">
|
<daemon name="bind" title="Bind9 nameserver" default="true">
|
||||||
<install><![CDATA[apt-get install bind9]]></install>
|
<install><![CDATA[apt-get install bind9]]></install>
|
||||||
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
|
||||||
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
|
||||||
|
|||||||
Reference in New Issue
Block a user