Skip to content

Commit 6062fa7

Browse files
authored
Merge pull request #4854 from coollabsio/next
fix new self-hosted installations
2 parents 6357b37 + ca2c669 commit 6062fa7

File tree

3 files changed

+113
-109
lines changed

3 files changed

+113
-109
lines changed

app/Console/Commands/Init.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ public function handle()
3535
}
3636

3737
$this->servers = Server::all();
38-
if (isCloud()) {
39-
} else {
38+
if (! isCloud()) {
4039
$this->send_alive_signal();
4140
get_public_ips();
4241
}
@@ -88,8 +87,10 @@ public function handle()
8887
$settings = instanceSettings();
8988
if (! is_null(config('constants.coolify.autoupdate', null))) {
9089
if (config('constants.coolify.autoupdate') == true) {
90+
echo "Enabling auto-update\n";
9191
$settings->update(['is_auto_update_enabled' => true]);
9292
} else {
93+
echo "Disabling auto-update\n";
9394
$settings->update(['is_auto_update_enabled' => false]);
9495
}
9596
}
@@ -119,7 +120,9 @@ private function optimize()
119120
private function update_user_emails()
120121
{
121122
try {
122-
User::whereRaw('email ~ \'[A-Z]\'')->get()->each(fn (User $user) => $user->update(['email' => strtolower($user->email)]));
123+
User::whereRaw('email ~ \'[A-Z]\'')->get()->each(function (User $user) {
124+
$user->update(['email' => strtolower($user->email)]);
125+
});
123126
} catch (\Throwable $e) {
124127
echo "Error in updating user emails: {$e->getMessage()}\n";
125128
}
@@ -200,7 +203,6 @@ private function restore_coolify_db_backup()
200203
try {
201204
$database = StandalonePostgresql::withTrashed()->find(0);
202205
if ($database && $database->trashed()) {
203-
echo "Restoring coolify db backup\n";
204206
$database->restore();
205207
$scheduledBackup = ScheduledDatabaseBackup::find(0);
206208
if (! $scheduledBackup) {

0 commit comments

Comments
 (0)