Преглед изворни кода

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
 	}