mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
*Add support for aliases
This commit is contained in:
parent
4daa17f54f
commit
c85967f894
2 changed files with 10 additions and 4 deletions
|
@ -149,9 +149,11 @@ if (!empty($_POST['ok'])) {
|
|||
// Add Lets Encrypt support
|
||||
|
||||
if ((!empty($_POST['v_letsencrypt'])) && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '' 'no'", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
exec (VESTA_CMD."v-list-web-domain ".$user." ".$v_domain." json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
exec (VESTA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '".$data['ALIAS']."' 'no'", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
}
|
||||
else {
|
||||
// Add SSL certificates only if Lets Encrypt is off
|
||||
|
|
|
@ -270,7 +270,9 @@ if (!empty($_POST['save'])) {
|
|||
else {
|
||||
// Delete SSL certificate
|
||||
if (( $v_ssl == 'yes' ) && (empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) {
|
||||
exec (VESTA_CMD."v-delete-web-domain-ssl ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||
exec (VESTA_CMD."v-list-web-domain ".$user." ".$v_domain." json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
exec (VESTA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '".$data['ALIAS']."' 'no'", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
$v_ssl = 'no';
|
||||
|
@ -279,6 +281,8 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
}
|
||||
if (( $v_letsencrypt == 'no' || empty( $v_letsencrypt)) && (!empty($_POST['v_letsencrypt'])) && empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v-list-web-domain ".$user." ".$v_domain." json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
exec (VESTA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '' 'no'", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue