mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-01 05:14:04 +02:00
other base image
This commit is contained in:
14
zzz_draft_birdnet-pi2/rootfs/custom-services.d/00_dbus
Normal file
14
zzz_draft_birdnet-pi2/rootfs/custom-services.d/00_dbus
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# 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
|
||||
@@ -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
|
||||
9
zzz_draft_birdnet-pi2/rootfs/custom-services.d/01_avahi
Normal file
9
zzz_draft_birdnet-pi2/rootfs/custom-services.d/01_avahi
Normal 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
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: birdnet analysis"
|
||||
exec \
|
||||
s6-setuidgid "$USER" "$PYTHON_VIRTUAL_ENV" /usr/local/bin/birdnet_analysis.py
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: birdnet log"
|
||||
exec \
|
||||
s6-setuidgid "$USER" /usr/local/bin/gotty --address localhost -p 8080 --path log --title-format "birdnet-pi2 Log" birdnet_log.sh
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: birdnet recording"
|
||||
exec \
|
||||
s6-setuidgid "$USER" /usr/local/bin/birdnet_recording.sh
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: birdnet stats"
|
||||
exec \
|
||||
s6-setuidgid "$USER" "$HOME"/birdnet-pi2/birdnet/bin/streamlit run "$HOME"/birdnet-pi2/scripts/plotly_streamlit.py --browser.gatherUsageStats false --server.address localhost --server.baseUrlPath "/stats"
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: chart viewer"
|
||||
exec \
|
||||
s6-setuidgid "$USER" "$PYTHON_VIRTUAL_ENV" /usr/local/bin/daily_plot.py --daemon --sleep 2
|
||||
9
zzz_draft_birdnet-pi2/rootfs/custom-services.d/01_getty
Normal file
9
zzz_draft_birdnet-pi2/rootfs/custom-services.d/01_getty
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: getty"
|
||||
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
||||
sleep 1s
|
||||
done
|
||||
|
||||
exec \
|
||||
s6-setuidgid "$USER" /sbin/agetty --autologin "${USER}"
|
||||
--noclear %I "$TERM"
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: livestream"
|
||||
until [[ -e /var/run/dbus/system_bus_socket ]]; do
|
||||
sleep 1s
|
||||
done
|
||||
|
||||
exec \
|
||||
s6-setuidgid "$USER" /usr/local/bin/livestream.sh
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: spectrogram viewer"
|
||||
exec \
|
||||
s6-setuidgid "$USER" /usr/local/bin/spectrogram.sh
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
echo "Starting service: web terminal"
|
||||
exec \
|
||||
s6-setuidgid "$USER" /usr/local/bin/gotty --address localhost -w -p 8888 --path terminal --title-format "birdnet-pi2 Terminal" login
|
||||
12
zzz_draft_birdnet-pi2/rootfs/custom-services.d/02_caddy
Normal file
12
zzz_draft_birdnet-pi2/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
|
||||
Reference in New Issue
Block a user