From b7307ff2dacb9d9eaed9aaa772aa404a027a616b Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 30 Oct 2019 12:11:56 -0400 Subject: [PATCH] Update src/commands/cwg.ts --- src/commands/cwg.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index 0d0d8a9..6c37699 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -135,8 +135,8 @@ export default class CWG extends Command { } } try { - await fs.unlink(`/etc/nginx/sites-available/${domain.domain}`); await fs.unlink(`/etc/nginx/sites-enabled/${domain.domain}`); + await fs.unlink(`/etc/nginx/sites-available/${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'); @@ -191,8 +191,8 @@ export default class CWG extends Command { } return entry.save(); } catch (error) { - await fs.unlink(`/etc/nginx/sites-available/${domain}`); await fs.unlink(`/etc/nginx/sites-enabled/${domain}`); + await fs.unlink(`/etc/nginx/sites-available/${domain}`); await this.client.db.Domain.deleteMany({ domain }); throw error; }