mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Rename esphomeyaml to esphome (#426)
* Rename * Update * Add migration * Fix * Fix dashboard * Change test * Fixes * Code cleanup * Fix import order * Update * Automate docker builds * Shellcheck
This commit is contained in:
		
							
								
								
									
										28
									
								
								docker/rootfs/etc/cont-init.d/20-nginx.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										28
									
								
								docker/rootfs/etc/cont-init.d/20-nginx.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # Configures NGINX for use with ESPHome | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
| source /usr/lib/hassio-addons/base.sh | ||||
|  | ||||
| declare certfile | ||||
| declare keyfile | ||||
| declare port | ||||
|  | ||||
| mkdir -p /var/log/nginx | ||||
|  | ||||
| # Enable SSL | ||||
| if hass.config.true 'ssl'; then | ||||
|     rm /etc/nginx/nginx.conf | ||||
|     mv /etc/nginx/nginx-ssl.conf /etc/nginx/nginx.conf | ||||
|  | ||||
|     certfile=$(hass.config.get 'certfile') | ||||
|     keyfile=$(hass.config.get 'keyfile') | ||||
|  | ||||
|     sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/nginx.conf | ||||
|     sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/nginx.conf | ||||
| fi | ||||
|  | ||||
| port=$(hass.config.get 'port') | ||||
| sed -i "s/%%port%%/${port}/g" /etc/nginx/nginx.conf | ||||
		Reference in New Issue
	
	Block a user