mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-30 18:22:49 -04:00 
			
		
		
		
	Log restarts
This commit is contained in:
		
							parent
							
								
									a6abec8210
								
							
						
					
					
						commit
						cf06abd691
					
				| @ -32,6 +32,8 @@ func init() { | ||||
| // work if executing with `go run`, since the binary is cleaned up | ||||
| // when `go run` sees the initial parent process exit. | ||||
| func Restart(newCaddyfile Input) error { | ||||
| 	log.Println("[INFO] Restarting") | ||||
| 
 | ||||
| 	if newCaddyfile == nil { | ||||
| 		caddyfileMu.Lock() | ||||
| 		newCaddyfile = caddyfile | ||||
|  | ||||
| @ -1,8 +1,12 @@ | ||||
| package caddy | ||||
| 
 | ||||
| import "log" | ||||
| 
 | ||||
| // Restart restarts Caddy forcefully using newCaddyfile, | ||||
| // or, if nil, the current/existing Caddyfile is reused. | ||||
| func Restart(newCaddyfile Input) error { | ||||
| 	log.Println("[INFO] Restarting") | ||||
| 
 | ||||
| 	if newCaddyfile == nil { | ||||
| 		caddyfileMu.Lock() | ||||
| 		newCaddyfile = caddyfile | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user