This commit is contained in:
Alexandre
2024-04-27 18:07:50 +02:00
parent 926de588ea
commit db23a995d3
16 changed files with 430 additions and 7 deletions

View File

@@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# Waiting for dbus
until [[ -e /var/run/dbus/system_bus_socket ]]; do
sleep 1s
done
echo "Starting service: php pfm"
exec /usr/sbin/php-fpm* -F

View File

@@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bashio
# Waiting for dbus
until [[ -e /var/run/dbus/system_bus_socket ]]; do
sleep 1s
done
echo "Starting service: avahi daemon"
exec \
avahi-daemon --no-chroot

View 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

View File

@@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bashio
echo "Starting service: avahi alias"
until [[ -e /start ]]; do
sleep 1s
done
exec \
s6-setuidgid "$USER" /usr/bin/avahi-publish -a -R %I "$(hostname)"