fix: revert enable site if enable a incorrect config #199

This commit is contained in:
0xJacky 2023-11-23 22:11:34 +08:00
parent 4b567e474c
commit 9a4174e6ef
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0

View file

@ -324,6 +324,7 @@ func EnableDomain(c *gin.Context) {
// Test nginx config, if not pass then disable the site.
output, err := nginx.TestConf()
if err != nil {
_ = os.Remove(enabledConfigFilePath)
ErrHandler(c, err)
return
}