mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-15 00:34:16 +01:00
15 lines
409 B
Bash
Executable File
15 lines
409 B
Bash
Executable File
#!/usr/bin/with-contenv bashio
|
|
# Dependencies
|
|
sockfile="empty"
|
|
until [[ -e /var/run/dbus/system_bus_socket ]] && [[ -e "$sockfile" ]]; do
|
|
sleep 1s
|
|
sockfile="$(find /run/php -name *.sock)"
|
|
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
|