mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-22 15:53:08 +02:00
chore: update scripts
This commit is contained in:
parent
c03eafd329
commit
63c3cc729a
@ -2,7 +2,7 @@ const { randomBytes } = require('crypto');
|
||||
const { short } = require('leeks.js');
|
||||
|
||||
console.log(short(
|
||||
'Set the "ENCRYPTION_KEY" environment variable to: \n&!b' +
|
||||
'Set the "ENCRYPTION_KEY" environment variable to: \n&!b ' +
|
||||
randomBytes(24).toString('hex') +
|
||||
'&r\n\n&0&!e WARNING &r &e&lIf you lose the encryption key, most of the data in the database will become unreadable, requiring a new key and a full reset.',
|
||||
' &r\n\n&0&!e WARNING &r &e&lIf you lose the encryption key, most of the data in the database will become unreadable, requiring a new key and a full reset.',
|
||||
));
|
@ -29,6 +29,7 @@ if (!process.env.ENCRYPTION_KEY && !fs.existsSync('./.env')) {
|
||||
log('generating ENCRYPTION_KEY');
|
||||
fs.writeFileSync('./.env', Object.entries(env).map(([k, v]) => `${k}=${v}`).join('\n'));
|
||||
log('created .env file');
|
||||
log(short('&r&0&!e WARNING &r &e&lkeep your environment variables safe, don\'t lose your encryption key or you will lose data'));
|
||||
} else {
|
||||
log('nothing to do');
|
||||
}
|
Loading…
Reference in New Issue
Block a user