mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 19:34:05 +02:00
clean
This commit is contained in:
14
birdnet-pi/rootfs/custom-services.d/02-caddy.sh
Normal file
14
birdnet-pi/rootfs/custom-services.d/02-caddy.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user