addon-grocy/grocy/rootfs/etc/s6-overlay/s6-rc.d/init-php-fpm/run
2022-12-22 13:33:29 +01:00

25 lines
856 B
Text
Executable file

#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Grocy
# Configures PHP-FPM for use with Grocy
# ==============================================================================
# Generate Ingress configuration
bashio::var.json \
name "ingress" \
port "^9002" \
base "$(bashio::addon.ingress_entry)" \
| tempio \
-template /etc/php81/templates/php-fpm.gtpl \
-out /etc/php81/php-fpm.d/ingress.conf
# Generate direct access configuration, if enabled.
if bashio::var.has_value "$(bashio::addon.port 80)"; then
bashio::var.json \
name "www" \
port "^9001" \
| tempio \
-template /etc/php81/templates/php-fpm.gtpl \
-out /etc/php81/php-fpm.d/www.conf
fi