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:
@@ -1,4 +1,14 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: dbus"
|
||||
exec \
|
||||
dbus-daemon --system --nofork
|
||||
# Waiting for dbus
|
||||
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
||||
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
|
||||
# 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
|
||||
@@ -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
|
||||
echo "Starting service: avahi daemon"
|
||||
# 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
|
||||
@@ -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 #
|
||||
#################
|
||||
|
||||
# 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"
|
||||
echo " "
|
||||
|
||||
|
||||
Reference in New Issue
Block a user