File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ public function run(): void
106
106
$ ssh_keys_directory = Storage::disk ('ssh-keys ' )->files ();
107
107
$ coolify_key = collect ($ ssh_keys_directory )->firstWhere (fn ($ item ) => str ($ item )->contains ($ coolify_key_name ));
108
108
109
- $ found = PrivateKey::find (0 );
109
+ $ server = Server::find (0 );
110
+ $ found = $ server ->privateKey ;
110
111
if ($ found ) {
111
112
echo 'Private Key found in database.\n ' ;
112
113
if ($ coolify_key ) {
@@ -125,17 +126,7 @@ public function run(): void
125
126
]);
126
127
$ server ->update (['user ' => $ user ]);
127
128
echo "SSH key found for the Coolify host machine (localhost). \n" ;
128
-
129
129
} else {
130
- PrivateKey::create (
131
- [
132
- 'id ' => 0 ,
133
- 'team_id ' => 0 ,
134
- 'name ' => 'localhost \'s key ' ,
135
- 'description ' => 'The private key for the Coolify host machine (localhost). ' ,
136
- 'private_key ' => 'Paste here you private key!! ' ,
137
- ]
138
- );
139
130
echo "No SSH key found for the Coolify host machine (localhost). \n" ;
140
131
echo "Please read the following documentation (point 3) to fix it: https://coolify.io/docs/knowledge-base/server/openssh/ \n" ;
141
132
echo "Your localhost connection won't work until then. " ;
You can’t perform that action at this time.
0 commit comments