MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / nginxCheckAndReload

Function nginxCheckAndReload

agent/app/service/nginx_utils.go:249–259  ·  view source on GitHub ↗
(oldContent string, filePath string, containerName string)

Source from the content-addressed store, hash-verified

247}
248
249func 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
261func updateDefaultServer(server *components.Server, httpPort int, httpsPort int, defaultServer bool, ssl bool) {
262 server.UpdateListen(fmt.Sprintf("%d", httpPort), defaultServer)

Callers 15

UpdateLoadBalanceMethod · 0.85
UpdateMethod · 0.85
addListenAndServerNameFunction · 0.85
removeSSLListenFunction · 0.85
opWebsiteFunction · 0.85
changeIPV6Function · 0.85
ConfigAllowIPsFunction · 0.85
updateWebsiteConfigFunction · 0.85
UpdateWebsiteDomainMethod · 0.85
UpdateNginxConfigFileMethod · 0.85
ChangePHPVersionMethod · 0.85

Calls 2

opNginxFunction · 0.85
WriteFileMethod · 0.80

Tested by

no test coverage detected