mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-07-08 05:51:23 -07:00
add dns only if there is dns support
This commit is contained in:
parent
41f9fa4ebd
commit
95df6666b1
1 changed files with 21 additions and 13 deletions
|
@ -167,6 +167,9 @@ if (!empty($_POST['save'])) {
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
if (empty($_SESSION['error_msg'])) {
|
if (empty($_SESSION['error_msg'])) {
|
||||||
|
exec (VESTA_CMD."v-list-dns-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||||
|
unset($output);
|
||||||
|
if ($return_var == 0) {
|
||||||
exec (VESTA_CMD."v-delete-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-delete-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
|
@ -178,6 +181,7 @@ if (!empty($_POST['save'])) {
|
||||||
unset($output);
|
unset($output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result = array_diff($aliases, $valiases);
|
$result = array_diff($aliases, $valiases);
|
||||||
foreach ($result as $alias) {
|
foreach ($result as $alias) {
|
||||||
|
@ -192,6 +196,9 @@ if (!empty($_POST['save'])) {
|
||||||
}
|
}
|
||||||
unset($output);
|
unset($output);
|
||||||
if (empty($_SESSION['error_msg'])) {
|
if (empty($_SESSION['error_msg'])) {
|
||||||
|
exec (VESTA_CMD."v-list-dns-domain ".$v_username." ".$v_domain, $output, $return_var);
|
||||||
|
unset($output);
|
||||||
|
if ($return_var == 0) {
|
||||||
exec (VESTA_CMD."v-add-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-add-dns-on-web-alias ".$v_username." ".$v_domain." '".$alias."' 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
|
@ -200,6 +207,7 @@ if (!empty($_POST['save'])) {
|
||||||
}
|
}
|
||||||
$restart_dns = 'yes';
|
$restart_dns = 'yes';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
unset($output);
|
unset($output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue