Files
hassio-addons/zzz_draft_birdnet-pi/rootfs/custom-services.d/02_caddy
Alexandre ce3cd7064f clean
2024-04-26 18:53:54 +02:00

14 lines
388 B
Plaintext

#!/usr/bin/with-contenv bashio
# Dependencies
sockfile="$(find /run/php -name *.sock)"
until [[ -e /var/run/dbus/system_bus_socket ]] && [[ -e "$sockfile" ]]; do
sleep 1s
done
# Correct fpm.sock
chown caddy:caddy /run/php/php*-fpm.sock
sed -i "s|/run/php/php-fpm.sock|$sockfile|g" /etc/caddy/Caddyfile
echo "Starting service: caddy"
/usr/bin/caddy run --config /etc/caddy/Caddyfile