@@ -65,6 +65,7 @@ public function __construct() {
65
65
$ hcpp ->add_action ( 'v_change_web_domain_proxy_tpl ' , [ $ this , 'v_change_web_domain_proxy_tpl ' ] );
66
66
$ hcpp ->add_action ( 'v_delete_web_domain_backend ' , [ $ this , 'v_delete_web_domain_backend ' ] );
67
67
$ hcpp ->add_action ( 'v_delete_web_domain ' , [ $ this , 'v_delete_web_domain_backend ' ] );
68
+ $ hcpp ->add_action ( 'v_rebuild_web_domain ' , [ $ this , 'v_rebuild_web_domain ' ] );
68
69
$ hcpp ->add_action ( 'v_suspend_web_domain ' , [ $ this , 'v_suspend_web_domain ' ] );
69
70
$ hcpp ->add_action ( 'v_unsuspend_web_domain ' , [ $ this , 'v_unsuspend_domain ' ] ); // Bulk unsuspend domains only throws this event
70
71
$ hcpp ->add_action ( 'v_unsuspend_domain ' , [ $ this , 'v_unsuspend_domain ' ] ); // Individually unsuspend domain only throws this event
@@ -899,6 +900,20 @@ public function v_delete_web_domain_backend( $args ) {
899
900
unlink ( "/usr/local/hestia/data/hcpp/ports/ $ user/ $ domain.ports " );
900
901
}
901
902
903
+ /**
904
+ * Rebuild the nginx config files for the given user and domain
905
+ */
906
+ public function v_rebuild_web_domain ( $ args ) {
907
+ global $ hcpp ;
908
+ $ user = $ args [0 ];
909
+ $ domain = $ args [1 ];
910
+ $ nodeapp_folder = "/home/ $ user/web/ $ domain/nodeapp " ;
911
+ if ( is_dir ( $ nodeapp_folder ) ) {
912
+ $ this ->generate_nginx_files ( $ nodeapp_folder , true );
913
+ }
914
+ return $ args ;
915
+ }
916
+
902
917
/**
903
918
* Notify of any changes to the nginx config files
904
919
*/
0 commit comments