(oldContent string, filePath string, containerName string)
| 247 | } |
| 248 | |
| 249 | func nginxCheckAndReload(oldContent string, filePath string, containerName string) error { |
| 250 | if err := opNginx(containerName, constant.NginxCheck); err != nil { |
| 251 | _ = files.NewFileOp().WriteFile(filePath, strings.NewReader(oldContent), constant.DirPerm) |
| 252 | return err |
| 253 | } |
| 254 | if err := opNginx(containerName, constant.NginxReload); err != nil { |
| 255 | _ = files.NewFileOp().WriteFile(filePath, strings.NewReader(oldContent), constant.DirPerm) |
| 256 | return err |
| 257 | } |
| 258 | return nil |
| 259 | } |
| 260 | |
| 261 | func updateDefaultServer(server *components.Server, httpPort int, httpsPort int, defaultServer bool, ssl bool) { |
| 262 | server.UpdateListen(fmt.Sprintf("%d", httpPort), defaultServer) |
no test coverage detected