conftest
This commit is contained in:
		
							
								
								
									
										10
									
								
								init.d/nginx
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								init.d/nginx
									
									
									
									
									
								
							| @@ -3,10 +3,14 @@ | ||||
| service_command='/usr/bin/nginx' | ||||
| service_pidfile='/run/nginx.pid' | ||||
|  | ||||
| nginx.test_config() { "$service_command" -tq; } | ||||
| nginx.test_config() { "$service_command" -t "$@"; } | ||||
|  | ||||
| conftest() { | ||||
| 	nginx.test_config | ||||
| } | ||||
|  | ||||
| reload() { | ||||
|     nginx.test_config || { | ||||
|     nginx.test_config -q || { | ||||
|         watchman.err "Nginx config test failed, not reloading." | ||||
|         return 1 | ||||
|     } | ||||
| @@ -15,7 +19,7 @@ reload() { | ||||
| } | ||||
|  | ||||
| restart() { | ||||
|     nginx.test_config || { | ||||
|     nginx.test_config -q || { | ||||
|         watchman.err "Nginx config test failed, not restarting." | ||||
|         return 1 | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user