File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public function __construct() {
23
23
$ hcpp ->nodeapp = $ this ;
24
24
$ hcpp ->add_action ( 'priv_change_web_domain_proxy_tpl ' , [ $ this , 'priv_change_web_domain_proxy_tpl ' ] );
25
25
$ hcpp ->add_action ( 'pre_delete_web_domain_backend ' , [ $ this , 'pre_delete_web_domain_backend ' ] );
26
+ $ hcpp ->add_action ( 'pre_restart_service ' , [ $ this , 'pre_restart_service ' ], 50 );
26
27
$ hcpp ->add_action ( 'priv_suspend_web_domain ' , [ $ this , 'priv_suspend_web_domain ' ] );
27
28
$ hcpp ->add_action ( 'priv_unsuspend_domain ' , [ $ this , 'priv_unsuspend_domain ' ] );
28
29
$ hcpp ->add_action ( 'priv_update_sys_queue ' , [ $ this , 'priv_update_sys_queue ' ] );
@@ -137,6 +138,17 @@ public function pre_delete_web_domain_backend( $args ) {
137
138
$ nodeapp_folder = "/home/ $ user/web/ $ domain/nodeapp " ;
138
139
$ this ->shutdown_apps ( $ nodeapp_folder );
139
140
}
141
+ d
142
+ /**
143
+ * Ensure we reload nginx to read our NodeApp configurations
144
+ */
145
+ public function pre_restart_service ( $ args ) {
146
+ global $ hcpp ;
147
+ $ service = $ args [0 ];
148
+ if ( $ service == 'nginx ' ) {
149
+ shell_exec ( 'systemctl reload nginx ' );
150
+ }
151
+ }
140
152
141
153
/**
142
154
* On domain suspend, shutdown apps
You can’t perform that action at this time.
0 commit comments