Update src/commands/cwg.ts
parent
b794f482f3
commit
b7307ff2da
|
@ -135,8 +135,8 @@ export default class CWG extends Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
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-enabled/${domain.domain}`);
|
||||||
|
await fs.unlink(`/etc/nginx/sites-available/${domain.domain}`);
|
||||||
} catch (e) { this.client.signale.error(e); }
|
} catch (e) { this.client.signale.error(e); }
|
||||||
await this.client.db.Domain.deleteOne({ domain: domain.domain });
|
await this.client.db.Domain.deleteOne({ domain: domain.domain });
|
||||||
await this.client.util.exec('systemctl reload nginx');
|
await this.client.util.exec('systemctl reload nginx');
|
||||||
|
@ -191,8 +191,8 @@ export default class CWG extends Command {
|
||||||
}
|
}
|
||||||
return entry.save();
|
return entry.save();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await fs.unlink(`/etc/nginx/sites-available/${domain}`);
|
|
||||||
await fs.unlink(`/etc/nginx/sites-enabled/${domain}`);
|
await fs.unlink(`/etc/nginx/sites-enabled/${domain}`);
|
||||||
|
await fs.unlink(`/etc/nginx/sites-available/${domain}`);
|
||||||
await this.client.db.Domain.deleteMany({ domain });
|
await this.client.db.Domain.deleteMany({ domain });
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue