File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ public function info( $_, $assoc_args ) {
162162 /**
163163 * Function to run migrations required to upgrade to the newer version. Will always be invoked from the newer phar downloaded inside the /tmp folder
164164 */
165- public function migrate () {
165+ private function migrate () {
166166 EE \Migration \Executor::execute_migrations ();
167167 }
168168
@@ -488,6 +488,20 @@ public function cmd_dump() {
488488 echo json_encode ( $ this ->command_to_array ( EE ::get_root_command () ) );
489489 }
490490
491+ /**
492+ * Uninstalls easyengine completely along with all sites
493+ *
494+ * @subcommand self-uninstall
495+ */
496+ public function self_uninstall () {
497+ EE ::confirm ("Are you sure you want to remove EasyEngine and all its sites(along with their data) ? " );
498+ Utils \default_launch ("docker rm -f $(docker ps -aqf label=org.label-schema.vendor= \"EasyEngine \") " );
499+ $ home = Utils \get_home_dir ();
500+ Utils \default_launch ("rm -rf $ home/.ee/ " );
501+ Utils \default_launch ("rm -rf $ home/ee-sites/ " );
502+ Utils \default_launch ("rm -rf " . EE_CONF_ROOT );
503+ }
504+
491505 /**
492506 * Generate tab completion strings.
493507 *
You can’t perform that action at this time.
0 commit comments