Skip to content

Commit 5096b36

Browse files
author
Serghey Rodin
committed
v-schedule-letsencrypt-domain
1 parent 3a73db2 commit 5096b36

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

web/add/web/index.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,12 @@
157157
}
158158

159159
// Add Lets Encrypt support
160-
161160
if ((!empty($_POST['v_letsencrypt'])) && (empty($_SESSION['error_msg']))) {
162-
exec (VESTA_CMD."v-list-web-domain ".$user." ".$v_domain." json", $output, $return_var);
163-
$data = json_decode(implode('', $output), true);
164-
exec (VESTA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '".$data['ALIAS']."' 'no'", $output, $return_var);
161+
exec (VESTA_CMD."v-schedule-letsencrypt-domain ".$user." ".$v_domain, $output, $return_var);
165162
check_return_code($return_var,$output);
166163
unset($output);
167-
}
168-
else {
169-
// Add SSL certificates only if Lets Encrypt is off
164+
} else {
165+
// Add SSL certificates only if Lets Encrypt is off
170166
if ((!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) {
171167
exec ('mktemp -d', $output, $return_var);
172168
$tmpdir = $output[0];
@@ -201,8 +197,8 @@
201197
check_return_code($return_var,$output);
202198
unset($output);
203199
}
204-
205200
}
201+
206202
// Add web stats
207203
if ((!empty($_POST['v_stats'])) && ($_POST['v_stats'] != 'none' ) && (empty($_SESSION['error_msg']))) {
208204
$v_stats = escapeshellarg($_POST['v_stats']);
@@ -239,13 +235,6 @@
239235
unset($output);
240236
}
241237

242-
// Restart backend server
243-
//if ((!empty($_SESSION['WEB_BACKEND'])) && (empty($_SESSION['error_msg']))) {
244-
// exec (VESTA_CMD."v-restart-web-backend", $output, $return_var);
245-
// check_return_code($return_var,$output);
246-
// unset($output);
247-
//}
248-
249238
// Restart proxy server
250239
if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
251240
exec (VESTA_CMD."v-restart-proxy", $output, $return_var);
@@ -355,7 +344,6 @@
355344
}
356345
}
357346

358-
359347
// Define user variables
360348
$v_ftp_user_prepath = $panel[$user]['HOME'] . "/web";
361349
$v_ftp_email = $panel[$user]['CONTACT'];

0 commit comments

Comments
 (0)