mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-04 11:11:30 +00:00
25 lines
982 B
Bash
Executable file
25 lines
982 B
Bash
Executable file
#!/usr/bin/with-contenv bashio
|
|
# ==============================================================================
|
|
# Home Assistant Community Add-on: Grocy
|
|
# Configures NGINX for use with Grocy
|
|
# ==============================================================================
|
|
|
|
# Generate Ingress PHP-FPM configuration
|
|
bashio::var.json \
|
|
interface "$(bashio::addon.ip_address)" \
|
|
grocy_user "$(bashio::config 'grocy_ingress_user')" \
|
|
| tempio \
|
|
-template /etc/nginx/templates/ingress.gtpl \
|
|
-out /etc/nginx/servers/ingress.conf
|
|
|
|
# Generate direct access configuration, if enabled.
|
|
if bashio::var.has_value "$(bashio::addon.port 80)"; then
|
|
bashio::config.require.ssl
|
|
bashio::var.json \
|
|
certfile "$(bashio::config 'certfile')" \
|
|
keyfile "$(bashio::config 'keyfile')" \
|
|
ssl "^$(bashio::config 'ssl')" \
|
|
| tempio \
|
|
-template /etc/nginx/templates/direct.gtpl \
|
|
-out /etc/nginx/servers/direct.conf
|
|
fi
|