Переглянути джерело

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

0xJacky 1 рік тому
батько
коміт
9a4174e6ef
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      server/api/domain.go

+ 1 - 0
server/api/domain.go

@@ -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
 	}