|
573 | 573 | check_return_code($return_var,$output); |
574 | 574 | unset($output); |
575 | 575 | $v_ssl_forcessl = 'yes'; |
| 576 | + $restart_web = 'yes'; |
| 577 | + $restart_proxy = 'yes'; |
576 | 578 | } |
577 | 579 |
|
578 | 580 | // Add SSL HSTS |
|
581 | 583 | check_return_code($return_var,$output); |
582 | 584 | unset($output); |
583 | 585 | $v_ssl_hsts = 'yes'; |
| 586 | + $restart_web = 'yes'; |
| 587 | + $restart_proxy = 'yes'; |
584 | 588 | } |
585 | 589 |
|
586 | 590 | // Delete Force SSL |
587 | 591 | if (( $v_ssl_forcessl == 'yes' ) && (empty($_POST['v_ssl_forcessl'])) && (empty($_SESSION['error_msg']))) { |
588 | | - exec (HESTIA_CMD."v-delete-web-domain-ssl-force ".$user." ".escapeshellarg($v_domain)." yes", $output, $return_var); |
| 592 | + exec (HESTIA_CMD."v-delete-web-domain-ssl-force ".$user." ".escapeshellarg($v_domain), $output, $return_var); |
589 | 593 | check_return_code($return_var,$output); |
590 | 594 | unset($output); |
591 | 595 | $v_ssl_forcessl = 'no'; |
| 596 | + $restart_web = 'yes'; |
| 597 | + $restart_proxy = 'yes'; |
592 | 598 | } |
593 | 599 |
|
594 | 600 | // Delete SSL HSTS |
595 | 601 | if (( $v_ssl_hsts == 'yes' ) && (empty($_POST['v_ssl_hsts'])) && (empty($_SESSION['error_msg']))) { |
596 | | - exec (HESTIA_CMD."v-delete-web-domain-ssl-hsts ".$user." ".escapeshellarg($v_domain)." yes", $output, $return_var); |
| 602 | + exec (HESTIA_CMD."v-delete-web-domain-ssl-hsts ".$user." ".escapeshellarg($v_domain), $output, $return_var); |
597 | 603 | check_return_code($return_var,$output); |
598 | 604 | unset($output); |
599 | 605 | $v_ssl_hsts = 'no'; |
| 606 | + $restart_web = 'yes'; |
| 607 | + $restart_proxy = 'yes'; |
600 | 608 | } |
601 | 609 |
|
602 | 610 | // Delete web stats |
|
822 | 830 | exec(HESTIA_CMD."v-change-web-domain-docroot ".$v_username." ".escapeshellarg($v_domain)." default", $output, $return_var); |
823 | 831 | check_return_code($return_var,$output); |
824 | 832 | unset($output); |
825 | | - unset($_POST['v-custom-doc-domain'], $_POST['v-custom-doc-folder']); |
| 833 | + unset($_POST['v-custom-doc-domain'], $_POST['v-custom-doc-folder']); |
| 834 | + $restart_web = 'yes'; |
| 835 | + $restart_proxy = 'yes'; |
826 | 836 | } |
827 | 837 |
|
828 | 838 | if ( !empty($_POST['v-custom-doc-domain']) && !empty($_POST['v_custom_doc_root_check']) && $v_custom_doc_root_prepath.$v_custom_doc_domain.'/public_html'.$v_custom_doc_folder != $v_custom_doc_root){ |
|
838 | 848 | check_return_code($return_var,$output); |
839 | 849 | unset($output); |
840 | 850 | $v_custom_doc_root = 1; |
| 851 | + |
841 | 852 | } |
| 853 | + $restart_web = 'yes'; |
| 854 | + $restart_proxy = 'yes'; |
842 | 855 | }else{ |
843 | 856 | unset($v_custom_doc_root); |
844 | 857 | } |
|
848 | 861 | check_return_code($return_var,$output); |
849 | 862 | unset($output); |
850 | 863 | unset($_POST['v-redirect']); |
| 864 | + $restart_web = 'yes'; |
| 865 | + $restart_proxy = 'yes'; |
851 | 866 | } |
852 | 867 |
|
853 | 868 | if (!empty($_POST['v-redirect']) && !empty($_POST['v-redirect-checkbox']) ){ |
|
860 | 875 | exec(HESTIA_CMD."v-add-web-domain-redirect ".$v_username." ".escapeshellarg($v_domain)." ".escapeshellarg($_POST['v-redirect'])." ".escapeshellarg($_POST['v-redirect-code']), $output, $return_var); |
861 | 876 | check_return_code($return_var,$output); |
862 | 877 | unset($output); |
863 | | - |
| 878 | + $restart_web = 'yes'; |
| 879 | + $restart_proxy = 'yes'; |
864 | 880 | } |
865 | 881 |
|
866 | 882 | }else { |
|
871 | 887 | exec(HESTIA_CMD."v-add-web-domain-redirect ".$v_username." ".escapeshellarg($v_domain)." ".escapeshellarg($_POST['v-redirect'])." ".escapeshellarg($_POST['v-redirect-code']), $output, $return_var); |
872 | 888 | check_return_code($return_var,$output); |
873 | 889 | unset($output); |
| 890 | + $restart_web = 'yes'; |
| 891 | + $restart_proxy = 'yes'; |
874 | 892 | } |
875 | 893 | } |
| 894 | + |
876 | 895 | } |
877 | 896 | // Restart web server |
878 | 897 | if (!empty($restart_web) && (empty($_SESSION['error_msg']))) { |
|
0 commit comments