mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
try systemd
This commit is contained in:
@@ -141,6 +141,7 @@ RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.
|
|||||||
|
|
||||||
# Avoid config.yaml interference
|
# Avoid config.yaml interference
|
||||||
WORKDIR /config
|
WORKDIR /config
|
||||||
|
ENTRYPOINT ["/lib/systemd/systemd"]
|
||||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||||
#CMD [ "/ha_entrypoint.sh" ]
|
#CMD [ "/ha_entrypoint.sh" ]
|
||||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|||||||
@@ -97,5 +97,5 @@
|
|||||||
},
|
},
|
||||||
"slug": "birdnet-pi",
|
"slug": "birdnet-pi",
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
||||||
"version": "1.2"
|
"version": "1.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
echo "Starting service: dbus"
|
# Waiting for dbus
|
||||||
exec \
|
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
||||||
dbus-daemon --system --nofork
|
sleep 1s
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Starting service: pulseaudio"
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
if [[ ! $(/usr/bin/pulseaudio --check) ]]; then
|
||||||
|
/usr/bin/pulseaudio --system
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=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
|
exec /usr/sbin/php-fpm* -F
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
|
||||||
echo "Starting service: pulseaudio"
|
|
||||||
exec s6-setuidgid pi /usr/bin/pulseaudio \
|
|
||||||
--log-level=0 \
|
|
||||||
--log-target=stderr \
|
|
||||||
--exit-idle-time=-1 > /dev/null 2>&1
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
echo "Starting service: avahi daemon"
|
# Waiting for dbus
|
||||||
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
||||||
sleep 1s
|
sleep 1s
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Starting service: avahi daemon"
|
||||||
exec \
|
exec \
|
||||||
avahi-daemon --no-chroot
|
avahi-daemon --no-chroot
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
|
||||||
echo "Starting service: caddy"
|
|
||||||
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
|
||||||
sleep 1s
|
|
||||||
done
|
|
||||||
|
|
||||||
exec \
|
|
||||||
s6-setuidgid "$USER" /usr/bin/caddy run --config /etc/caddy/Caddyfile
|
|
||||||
12
zzz_draft_birdnet-pi/rootfs/custom-services.d/02_caddy
Normal file
12
zzz_draft_birdnet-pi/rootfs/custom-services.d/02_caddy
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# Dependencies
|
||||||
|
until [[ -e /var/run/dbus/system_bus_socket ]] && [[ -e /run/php/php*-fpm.sock ]]; do
|
||||||
|
sleep 1s
|
||||||
|
done
|
||||||
|
|
||||||
|
# Correct fpm.sock
|
||||||
|
sed -i "s|/run/php/php-fpm.sock|$(find /run/php -name *.sock)|g" /etc/caddy/Caddyfile
|
||||||
|
|
||||||
|
echo "Starting service: caddy"
|
||||||
|
exec \
|
||||||
|
s6-setuidgid "$USER" /usr/bin/caddy run --config /etc/caddy/Caddyfile
|
||||||
@@ -6,6 +6,10 @@ set -e
|
|||||||
# INITALISATION #
|
# INITALISATION #
|
||||||
#################
|
#################
|
||||||
|
|
||||||
|
# Starting dbus
|
||||||
|
echo "Starting service: dbus"
|
||||||
|
service dbus start
|
||||||
|
|
||||||
bashio::log.info "ALSA_CARD option is set to $(bashio::config "ALSA_CARD"). If the microphone doesn't work, please adapt it"
|
bashio::log.info "ALSA_CARD option is set to $(bashio::config "ALSA_CARD"). If the microphone doesn't work, please adapt it"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user