@@ -65,6 +65,7 @@ public function __construct() {
6565 $ hcpp ->add_action ( 'v_change_web_domain_proxy_tpl ' , [ $ this , 'v_change_web_domain_proxy_tpl ' ] );
6666 $ hcpp ->add_action ( 'v_delete_web_domain_backend ' , [ $ this , 'v_delete_web_domain_backend ' ] );
6767 $ 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 ' ] );
6869 $ hcpp ->add_action ( 'v_suspend_web_domain ' , [ $ this , 'v_suspend_web_domain ' ] );
6970 $ hcpp ->add_action ( 'v_unsuspend_web_domain ' , [ $ this , 'v_unsuspend_domain ' ] ); // Bulk unsuspend domains only throws this event
7071 $ 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 ) {
899900 unlink ( "/usr/local/hestia/data/hcpp/ports/ $ user/ $ domain.ports " );
900901 }
901902
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+
902917 /**
903918 * Notify of any changes to the nginx config files
904919 */
0 commit comments