From a2bf5f8eba22508bd7610eae392d68e16848d96d Mon Sep 17 00:00:00 2001 From: L0RD-ZER0 <68327382+L0RD-ZER0@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:24:04 +0530 Subject: [PATCH 1/4] Fix admin-email flag typo --- src/PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHP.php b/src/PHP.php index 639625e..7f1fdaf 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -297,7 +297,7 @@ public function create( $args, $assoc_args ) { $this->site_data['db_port'] = empty( $arg_host_port[1] ) ? '3306' : $arg_host_port[1]; } } - $this->site_data['app_admin_email'] = \EE\Utils\get_flag_value( $assoc_args, 'admin_email', strtolower( 'admin@' . $this->site_data['site_url'] ) ); + $this->site_data['app_admin_email'] = \EE\Utils\get_flag_value( $assoc_args, 'admin-email', strtolower( 'admin@' . $this->site_data['site_url'] ) ); $this->skip_status_check = \EE\Utils\get_flag_value( $assoc_args, 'skip-status-check' ); $this->force = \EE\Utils\get_flag_value( $assoc_args, 'force' ); From 4fdcbee962c0425b9bda2f1380705c62b1470404 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Fri, 27 Sep 2024 21:36:56 +0530 Subject: [PATCH 2/4] Update chown to parent www dir Signed-off-by: Riddhesh Sanghvi --- src/PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHP.php b/src/PHP.php index 53aba72..c5ced33 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -476,7 +476,7 @@ private function configure_site_files() { // Assign www-data user ownership. chdir( $this->site_data['site_fs_path'] ); - \EE_DOCKER::docker_compose_exec( sprintf( 'chown -R www-data: %s', $this->site_data['site_container_fs_path'], 'php', 'bash', 'root' ) ); + \EE_DOCKER::docker_compose_exec( 'chown -R www-data: /var/www/', 'php', 'bash', 'root' ); \EE::success( 'Configuration files copied.' ); } catch ( \Exception $e ) { From acc7072a762246b9e89bd75a43342ef9ff3849d3 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Wed, 2 Oct 2024 22:30:59 +0530 Subject: [PATCH 3/4] Update to exit 1 on failure rollback Signed-off-by: Riddhesh Sanghvi --- src/PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHP.php b/src/PHP.php index c5ced33..5eaac8d 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -990,7 +990,7 @@ protected function rollback() { $this->delete_site( $this->level, $this->site_data['site_url'], $this->site_data['site_fs_path'], $db_data ); } \EE::success( 'Rollback complete. Exiting now.' ); - exit; + exit( 1 ); } } From 42a347d7a23f2b4e31edf8b6e7aa91247a46bf25 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Thu, 3 Oct 2024 17:15:23 +0530 Subject: [PATCH 4/4] Update to exit 1 on site creation failure cleanup Signed-off-by: Riddhesh Sanghvi --- src/PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHP.php b/src/PHP.php index 5eaac8d..64a7807 100644 --- a/src/PHP.php +++ b/src/PHP.php @@ -973,7 +973,7 @@ private function catch_clean( $e ) { $this->delete_site( $this->level, $this->site_data['site_url'], $this->site_data['site_fs_path'], $db_data ); \EE\Utils\delem_log( 'site cleanup end' ); \EE::log( 'Report bugs here: https://github.com/EasyEngine/site-type-php' ); - exit; + exit( 1 ); } /**