File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +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
+ $ hcpp ->add_action ( 'post_restart_proxy ' , [ $ this , 'post_restart_proxy ' ], 50 );
27
27
$ hcpp ->add_action ( 'priv_suspend_web_domain ' , [ $ this , 'priv_suspend_web_domain ' ] );
28
28
$ hcpp ->add_action ( 'priv_unsuspend_domain ' , [ $ this , 'priv_unsuspend_domain ' ] );
29
29
$ hcpp ->add_action ( 'priv_update_sys_queue ' , [ $ this , 'priv_update_sys_queue ' ] );
@@ -142,12 +142,11 @@ public function pre_delete_web_domain_backend( $args ) {
142
142
/**
143
143
* Ensure we reload nginx to read our NodeApp configurations
144
144
*/
145
- public function pre_restart_service ( $ args ) {
145
+ public function post_restart_proxy ( ) {
146
146
global $ hcpp ;
147
- $ service = $ args [0 ];
148
- if ( $ service == 'nginx ' ) {
149
- shell_exec ( 'systemctl reload nginx ' );
150
- }
147
+ $ cmd = 'service nginx reload ' ;
148
+ $ hcpp ->log ( $ cmd );
149
+ shell_exec ( $ cmd );
151
150
}
152
151
153
152
/**
You can’t perform that action at this time.
0 commit comments