1
0
Fork 0

Update src/commands/cwg.ts

refactor/models
Matthew 2019-10-30 11:56:38 -04:00
parent 80c8328e87
commit b794f482f3
1 changed files with 4 additions and 2 deletions

View File

@ -134,8 +134,10 @@ export default class CWG extends Command {
});
}
}
await fs.unlink(`/etc/nginx/sites-available/${domain.domain}`);
await fs.unlink(`/etc/nginx/sites-enabled/${domain.domain}`);
try {
await fs.unlink(`/etc/nginx/sites-available/${domain.domain}`);
await fs.unlink(`/etc/nginx/sites-enabled/${domain.domain}`);
} catch (e) { this.client.signale.error(e); }
await this.client.db.Domain.deleteOne({ domain: domain.domain });
await this.client.util.exec('systemctl reload nginx');
edit.edit(`***${this.client.stores.emojis.success} Domain ${domain.domain} with port ${domain.port} has been successfully deleted.***`);