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() {
2323 $ hcpp ->nodeapp = $ this ;
2424 $ hcpp ->add_action ( 'priv_change_web_domain_proxy_tpl ' , [ $ this , 'priv_change_web_domain_proxy_tpl ' ] );
2525 $ 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 );
2727 $ hcpp ->add_action ( 'priv_suspend_web_domain ' , [ $ this , 'priv_suspend_web_domain ' ] );
2828 $ hcpp ->add_action ( 'priv_unsuspend_domain ' , [ $ this , 'priv_unsuspend_domain ' ] );
2929 $ hcpp ->add_action ( 'priv_update_sys_queue ' , [ $ this , 'priv_update_sys_queue ' ] );
@@ -142,12 +142,11 @@ public function pre_delete_web_domain_backend( $args ) {
142142 /**
143143 * Ensure we reload nginx to read our NodeApp configurations
144144 */
145- public function pre_restart_service ( $ args ) {
145+ public function post_restart_proxy ( ) {
146146 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 );
151150 }
152151
153152 /**
You can’t perform that action at this time.
0 commit comments