merge-requests/1/merge
Bsian 2019-10-28 22:13:45 +00:00
parent 633d667386
commit 27fa7152e1
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ export default class CWG extends Command {
if (!await this.client.db.Account.exists({ userID: account.userID })) throw new Error(`Cannot find account ${account.userID}.`); if (!await this.client.db.Account.exists({ userID: account.userID })) throw new Error(`Cannot find account ${account.userID}.`);
await fs.access(x509Certificate.cert, fs.constants.R_OK); await fs.access(x509Certificate.cert, fs.constants.R_OK);
await fs.access(x509Certificate.key, fs.constants.R_OK); await fs.access(x509Certificate.key, fs.constants.R_OK);
const staticFiles = await fs.readdir('../static')
console.log(staticFiles);
let cfg = await fs.readFile('../static/nginx.conf', { encoding: 'utf8' }); let cfg = await fs.readFile('../static/nginx.conf', { encoding: 'utf8' });
cfg = cfg.replace(/\[DOMAIN]/g, domain); cfg = cfg.replace(/\[DOMAIN]/g, domain);
cfg = cfg.replace(/\[PORT]/g, String(port)); cfg = cfg.replace(/\[PORT]/g, String(port));