@@ -43,7 +43,7 @@ const enum CLI_ACTIONS {
4343 ENABLE_PASSWORD_AUTH = 'enable-password-auth' ,
4444 EXIT = 'exit' ,
4545 FIX_POSTGRES_COLLATION = 'fix-postgres-collation' ,
46- GET_SSL_CERT_FOR_NODE = 'get-ssl-cert -for-node' ,
46+ GET_SECRET_KEY_FOR_NODE = 'get-secret-key -for-node' ,
4747 RESET_CERTS = 'reset-certs' ,
4848 RESET_SUPERADMIN = 'reset-superadmin' ,
4949 TRUNCATE_HWID_USER_DEVICES = 'truncate-hwid-user-devices' ,
@@ -145,19 +145,19 @@ async function resetCerts() {
145145 }
146146}
147147
148- async function getSslCertForNode ( ) {
149- consola . start ( '🔑 Getting SSL cert for node...' ) ;
148+ async function getSecretKeyForNode ( ) {
149+ consola . start ( '🔑 Getting SECRET_KEY for node...' ) ;
150150
151151 try {
152152 const keygen = await prisma . keygen . findFirst ( ) ;
153153
154154 if ( ! keygen ) {
155- consola . error ( '❌ Keygen not found. Reset certs first or restart Remnawave.' ) ;
155+ consola . error ( '❌ Keygen not found. Reset SECRET_KEY first or restart Remnawave.' ) ;
156156 process . exit ( 1 ) ;
157157 }
158158
159159 if ( ! keygen . caCert || ! keygen . caKey ) {
160- consola . error ( '❌ Certs not found. Reset certs first or restart Remnawave.' ) ;
160+ consola . error ( '❌ Certs not found. Reset SECRET_KEY first or restart Remnawave.' ) ;
161161 process . exit ( 1 ) ;
162162 }
163163
@@ -170,13 +170,13 @@ async function getSslCertForNode() {
170170 jwtPublicKey : keygen . pubKey ,
171171 } ) ;
172172
173- consola . success ( '✅ SSL cert for node generated successfully.' ) ;
173+ consola . success ( '✅ SECRET_KEY for node generated successfully.' ) ;
174174
175- consola . info ( `\nSSL_CERT ="${ nodePayload } "` ) ;
175+ consola . info ( `\nSECRET_KEY ="${ nodePayload } "` ) ;
176176
177177 process . exit ( 0 ) ;
178178 } catch ( error ) {
179- consola . error ( '❌ Failed to get SSL cert for node:' , error ) ;
179+ consola . error ( '❌ Failed to get SECRET_KEY for node:' , error ) ;
180180 process . exit ( 1 ) ;
181181 }
182182}
@@ -332,9 +332,9 @@ async function main() {
332332 hint : 'Fully reset certs' ,
333333 } ,
334334 {
335- value : CLI_ACTIONS . GET_SSL_CERT_FOR_NODE ,
336- label : 'Get SSL_CERT for a Remnawave Node' ,
337- hint : 'Get SSL_CERT in cases, where you can not get from Panel' ,
335+ value : CLI_ACTIONS . GET_SECRET_KEY_FOR_NODE ,
336+ label : 'Get SECRET_KEY for a Remnawave Node' ,
337+ hint : 'Get SECRET_KEY in cases, where you can not get from Panel' ,
338338 } ,
339339 {
340340 value : CLI_ACTIONS . FIX_POSTGRES_COLLATION ,
@@ -366,8 +366,8 @@ async function main() {
366366 case CLI_ACTIONS . RESET_CERTS :
367367 await resetCerts ( ) ;
368368 break ;
369- case CLI_ACTIONS . GET_SSL_CERT_FOR_NODE :
370- await getSslCertForNode ( ) ;
369+ case CLI_ACTIONS . GET_SECRET_KEY_FOR_NODE :
370+ await getSecretKeyForNode ( ) ;
371371 break ;
372372 case CLI_ACTIONS . FIX_POSTGRES_COLLATION :
373373 await fixPostgresCollation ( ) ;
0 commit comments