mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Clean up remove caddy refs (#139)
* Changed reference to Caddy over to CoreDNS * Removing references to caddy * Fixed misleading error message to reference coredns * Cleaning up references to caddy * Adding clean and deps targets Muscle memory is resulting in "make clean" commands. * Adding test target to makefile * More "Caddy" cleanup
This commit is contained in:
		
				
					committed by
					
						 Miek Gieben
						Miek Gieben
					
				
			
			
				
	
			
			
			
						parent
						
							bba63f7765
						
					
				
				
					commit
					e34280e7af
				
			| @@ -2,15 +2,15 @@ package core | ||||
|  | ||||
| import "log" | ||||
|  | ||||
| // Restart restarts Caddy forcefully using newCaddyfile, | ||||
| // or, if nil, the current/existing Caddyfile is reused. | ||||
| func Restart(newCaddyfile Input) error { | ||||
| // Restart restarts CoreDNS forcefully using newCorefile, | ||||
| // or, if nil, the current/existing Corefile is reused. | ||||
| func Restart(newCorefile Input) error { | ||||
| 	log.Println("[INFO] Restarting") | ||||
|  | ||||
| 	if newCaddyfile == nil { | ||||
| 		caddyfileMu.Lock() | ||||
| 		newCaddyfile = caddyfile | ||||
| 		caddyfileMu.Unlock() | ||||
| 	if newCorefile == nil { | ||||
| 		corefileMu.Lock() | ||||
| 		newCorefile = corefile | ||||
| 		corefileMu.Unlock() | ||||
| 	} | ||||
|  | ||||
| 	wg.Add(1) // barrier so Wait() doesn't unblock | ||||
| @@ -20,7 +20,7 @@ func Restart(newCaddyfile Input) error { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	err = Start(newCaddyfile) | ||||
| 	err = Start(newCorefile) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user