|
167 | 167 | exec (HESTIA_CMD."v-schedule-letsencrypt-domain ".$user." ".escapeshellarg($v_domain), $output, $return_var); |
168 | 168 | check_return_code($return_var,$output); |
169 | 169 | unset($output); |
| 170 | + |
| 171 | + if(!empty($_POST['v_ssl_forcessl']) && $_POST['v_ssl_forcessl'] = 'yes'){ |
| 172 | + exec (HESTIA_CMD."v-add-web-domain-ssl-preset ".$user." ".escapeshellarg($v_domain)." 'yes'", $output, $return_var); |
| 173 | + check_return_code($return_var,$output); |
| 174 | + unset ($output); |
| 175 | + } |
| 176 | + |
170 | 177 | } else { |
171 | 178 | // Add SSL certificates only if Lets Encrypt is off |
172 | 179 | if ((!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) { |
|
202 | 209 | exec (HESTIA_CMD."v-add-web-domain-ssl ".$user." ".escapeshellarg($v_domain)." ".$tmpdir." ".$v_ssl_home." 'no'", $output, $return_var); |
203 | 210 | check_return_code($return_var,$output); |
204 | 211 | unset($output); |
| 212 | + |
| 213 | + if(!empty($_POST['v_ssl_forcessl']) && $_POST['v_ssl_forcessl'] = 'yes'){ |
| 214 | + exec (HESTIA_CMD."v-add-web-domain-ssl-force ".$user." ".escapeshellarg($v_domain), $output, $return_var); |
| 215 | + check_return_code($return_var,$output); |
| 216 | + unset ($output); |
| 217 | + } |
205 | 218 |
|
206 | 219 | // Cleanup certificate tempfiles |
207 | 220 | if (!empty($_POST['v_ssl_crt'])) unlink($tmpdir."/".$v_domain.".crt"); |
|
384 | 397 | $v_ftp_email = $panel[$user]['CONTACT']; |
385 | 398 | $v_custom_doc_root_prepath = '/home/'.$user.'/web/'; |
386 | 399 |
|
| 400 | +if( $_POST['v_ssl_forcessl'] != 'no' ){ |
| 401 | + $v_ssl_forcessl = 'yes'; |
| 402 | +}else{ |
| 403 | + $v_ssl_forcessl = 'no'; |
| 404 | +} |
| 405 | + |
387 | 406 | // List IP addresses |
388 | 407 | exec (HESTIA_CMD."v-list-user-ips ".$user." json", $output, $return_var); |
389 | 408 | $ips = json_decode(implode('', $output), true); |
|
0 commit comments