|
157 | 157 | } |
158 | 158 |
|
159 | 159 | // Add Lets Encrypt support |
160 | | - |
161 | 160 | 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); |
165 | 162 | check_return_code($return_var,$output); |
166 | 163 | 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 |
170 | 166 | if ((!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) { |
171 | 167 | exec ('mktemp -d', $output, $return_var); |
172 | 168 | $tmpdir = $output[0]; |
|
201 | 197 | check_return_code($return_var,$output); |
202 | 198 | unset($output); |
203 | 199 | } |
204 | | - |
205 | 200 | } |
| 201 | + |
206 | 202 | // Add web stats |
207 | 203 | if ((!empty($_POST['v_stats'])) && ($_POST['v_stats'] != 'none' ) && (empty($_SESSION['error_msg']))) { |
208 | 204 | $v_stats = escapeshellarg($_POST['v_stats']); |
|
239 | 235 | unset($output); |
240 | 236 | } |
241 | 237 |
|
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 | | - |
249 | 238 | // Restart proxy server |
250 | 239 | if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) { |
251 | 240 | exec (VESTA_CMD."v-restart-proxy", $output, $return_var); |
|
355 | 344 | } |
356 | 345 | } |
357 | 346 |
|
358 | | - |
359 | 347 | // Define user variables |
360 | 348 | $v_ftp_user_prepath = $panel[$user]['HOME'] . "/web"; |
361 | 349 | $v_ftp_email = $panel[$user]['CONTACT']; |
|
0 commit comments