mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
update
This commit is contained in:
@@ -31,7 +31,7 @@ ENV DEBIAN_FRONTEND="noninteractive" \
|
|||||||
RUN \
|
RUN \
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
echo "Install dependencies" && \
|
echo "Install dependencies" && \
|
||||||
apt-get update -y && apt-get install curl gcc python3-dev git jq sudo -y && \
|
apt-get update -y && apt-get install curl gcc python3-dev git jq sudo php-mbstring -y && \
|
||||||
\
|
\
|
||||||
# Correct for systemctl
|
# Correct for systemctl
|
||||||
curl -f -L -s -S https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -o /bin/systemctl && \
|
curl -f -L -s -S https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -o /bin/systemctl && \
|
||||||
@@ -85,27 +85,6 @@ RUN \
|
|||||||
ln -s /home/pi /app && \
|
ln -s /home/pi /app && \
|
||||||
chown -R 1000:1000 /home/pi /app
|
chown -R 1000:1000 /home/pi /app
|
||||||
|
|
||||||
#USER pi
|
|
||||||
#WORKDIR /app
|
|
||||||
#RUN export DEBIAN_FRONTEND noninteractive && \
|
|
||||||
# export BIRDNET_USER="pi" && \
|
|
||||||
# export USER="pi" && \
|
|
||||||
# export HOME="/app" && \
|
|
||||||
# echo "HOME is $HOME" && \
|
|
||||||
# ls -l /app && \
|
|
||||||
# sudo chown -R pi:pi /app && \
|
|
||||||
# /./newinstaller.sh
|
|
||||||
#USER root
|
|
||||||
#sudo -E -u birdnet -s /bin/bash -c "/newinstaller.sh"
|
|
||||||
# Correct script
|
|
||||||
#sed -i "s|== 0|== 7|g" /newinstaller.sh && \
|
|
||||||
#sed -i "s|sudo -n true|true|g" /newinstaller.sh && \
|
|
||||||
#sed -i "s|sudo -K|true|g" /newinstaller.sh && \
|
|
||||||
#for file in $(grep -srl "sudo" $HOME/BirdNET-Pi/scripts); do \sed -i "s|sudo ||" "$file"; done && \
|
|
||||||
#/./newinstaller.sh
|
|
||||||
# Correct for absence of sudo
|
|
||||||
#sudo -E -u birdnet -s /bin/bash -c "/newinstaller.sh"
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# 2 Modify Image #
|
# 2 Modify Image #
|
||||||
##################
|
##################
|
||||||
@@ -135,7 +114,7 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
|
|||||||
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
|
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
|
||||||
|
|
||||||
# Manual apps
|
# Manual apps
|
||||||
ENV PACKAGES="alsa-utils libasound2-plugins nginx"
|
ENV PACKAGES="alsa-utils libasound2-plugins"
|
||||||
|
|
||||||
# Automatic apps & bashio
|
# Automatic apps & bashio
|
||||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
||||||
|
|||||||
@@ -61,34 +61,24 @@
|
|||||||
"environment": {
|
"environment": {
|
||||||
},
|
},
|
||||||
"init": false,
|
"init": false,
|
||||||
"ingress": true,
|
|
||||||
"ingress_stream": true,
|
|
||||||
"map": [
|
"map": [
|
||||||
"addon_config:rw",
|
"addon_config:rw",
|
||||||
"media:rw",
|
"media:rw",
|
||||||
"share:rw"
|
"share:rw"
|
||||||
],
|
],
|
||||||
"name": "zzz Do not use",
|
"name": "BirdNET-pi",
|
||||||
"options": {
|
|
||||||
"COMMAND": "realtime"
|
|
||||||
},
|
|
||||||
"panel_icon": "mdi:bird",
|
"panel_icon": "mdi:bird",
|
||||||
"ports": {
|
"ports": {
|
||||||
"80/tcp": 80
|
"80/tcp": 80
|
||||||
},
|
},
|
||||||
"ports_description": {
|
"ports_description": {
|
||||||
"80/tcp": "web ui",
|
"80/tcp": "web ui"
|
||||||
"8888/tcp": "web terminal",
|
|
||||||
"8080/tcp": "log",
|
|
||||||
"8501/tcp": "streamlit"
|
|
||||||
},
|
},
|
||||||
"privileged": [
|
"privileged": [
|
||||||
"SYS_ADMIN",
|
"SYS_ADMIN",
|
||||||
"DAC_READ_SEARCH"
|
"DAC_READ_SEARCH"
|
||||||
],
|
],
|
||||||
"schema": {
|
"schema": {
|
||||||
"ALSA_CARD": "int?",
|
|
||||||
"COMMAND": "str",
|
|
||||||
"TZ": "str?",
|
"TZ": "str?",
|
||||||
"cifsdomain": "str?",
|
"cifsdomain": "str?",
|
||||||
"cifspassword": "str?",
|
"cifspassword": "str?",
|
||||||
@@ -98,6 +88,7 @@
|
|||||||
},
|
},
|
||||||
"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.9",
|
"version": "1.0",
|
||||||
"video": true
|
"video": true,
|
||||||
|
"webui": "[PROTO:ssl]://[HOST]:[PORT:80]"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
|
||||||
# shellcheck shell=bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
#################
|
|
||||||
# NGINX SETTING #
|
|
||||||
#################
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
declare ingress_interface
|
|
||||||
declare ingress_port
|
|
||||||
|
|
||||||
bashio::log.info "Setting up ingress"
|
|
||||||
|
|
||||||
echo "... adding new instructions"
|
|
||||||
cat /Caddyfile >> /etc/caddy/Caddyfile
|
|
||||||
rm /Caddyfile
|
|
||||||
|
|
||||||
echo "... customizing"
|
|
||||||
ingress_port=$(bashio::addon.ingress_port)
|
|
||||||
ingress_interface=$(bashio::addon.ip_address)
|
|
||||||
ingress_entry=$(bashio::addon.ingress_entry)
|
|
||||||
sed -i "s/%%port%%/${ingress_port}/g" /etc/caddy/Caddyfile
|
|
||||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/caddy/Caddyfile
|
|
||||||
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/caddy/Caddyfile
|
|
||||||
Reference in New Issue
Block a user