From 4dca34f979a7322234a61abc7502f1e52a430350 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Sun, 20 Aug 2017 05:17:57 +0200 Subject: [PATCH] Fix bug with add ServerAlias ! --- inc/accounts.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/accounts.php b/inc/accounts.php index 232d9ab..36a82e5 100644 --- a/inc/accounts.php +++ b/inc/accounts.php @@ -57,16 +57,17 @@ function web_add($form, $admin_mail) { $form->getField('domain')->getValue()); //domain_add($form, $_SERVER['SERVER_ADDR'], true); - sudoexec($exec_cmd, $exec_output, $exec_return); + //sudoexec($exec_cmd, $exec_output, $exec_return); /* Gestion des noms de domaines supplementaires */ if ( $form->getField('domain_alias')->getValue() ) { $domain_alias = preg_split('/,/', $form->getField('domain_alias')->getValue()); foreach ( $domain_alias as $domain ) { - $exec_cmd = 'web-add.sh add-alias '.$form->getField('domain')->getValue().' '; + $exec_cmd = 'web-add.sh add-alias '.$form->getField('username')->getValue().' '; $domain = trim($domain); $exec_cmd .= $domain.' '.$master.' '.$slave; - sudoexec($exec_cmd, $exec_output, $exec_return); + //sudoexec($exec_cmd, $exec_output, $exec_return); + print $exec_cmd $exec_output $exec_return ; die; //domain_add($form, gethostbyname($master), false); } $exec_return |= $exec_return2; // $exec_return == 0 if $exec_return == 0 && $exec_return2 == 0