File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ public function __construct() {
2222 $ hcpp ->add_action ( 'priv_unsuspend_domain ' , [ $ this , 'priv_unsuspend_domain ' ] );
2323 $ hcpp ->add_action ( 'hcpp_plugin_installed ' , [ $ this , 'hcpp_plugin_installed ' ] );
2424 $ hcpp ->add_action ( 'hcpp_new_domain_ready ' , [ $ this , 'hcpp_new_domain_ready ' ] );
25- $ hcpp ->add_action ( 'hcpp_rebooted ' , [ $ this , 'hcpp_rebooted ' ] );
2625 }
2726
2827 // Set MAILCATCHER_DOMAIN for PM2 started processes
@@ -75,20 +74,15 @@ public function setup( $user, $domain ) {
7574 $ this ->start ();
7675 }
7776
78- // Start mailcatcher
77+ // Start mailcatcher and save the process list
7978 public function start () {
8079 $ cmd = 'if ! runuser -s /bin/bash -l "mailcatcher" -c "cd /opt/mailcatcher && export NVM_DIR=/opt/nvm && source /opt/nvm/nvm.sh && pm2 list" | grep -q "mailcatcher_app"; ' ;
81- $ cmd .= 'then runuser -s /bin/bash -l "mailcatcher" -c "cd /opt/mailcatcher && export NVM_DIR=/opt/nvm && source /opt/nvm/nvm.sh ; pm2 start mailcatcher.config.js"; fi ' ;
80+ $ cmd .= 'then runuser -s /bin/bash -l "mailcatcher" -c "cd /opt/mailcatcher && export NVM_DIR=/opt/nvm && source /opt/nvm/nvm.sh ; pm2 start mailcatcher.config.js" ; pm2 save --force ; fi ' ;
8281 global $ hcpp ;
8382 $ cmd = $ hcpp ->do_action ( 'mailcatcher_start ' , $ cmd );
8483 $ hcpp ->log ( shell_exec ( $ cmd ) );
8584 }
86-
87- // Start mailcatcher on reboot
88- public function hcpp_rebooted () {
89- $ this ->start ();
90- }
91-
85+
9286 public function priv_unsuspend_domain ( $ args ) {
9387 $ user = $ args [0 ];
9488 $ domain = $ args [1 ];
You can’t perform that action at this time.
0 commit comments