mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-09 00:55:58 +02:00
Compare commits
4 Commits
619f78aa53
...
7cdb4b478a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cdb4b478a | ||
|
|
c6fb0befea | ||
|
|
4ad9488db8 | ||
|
|
a5f005e1c6 |
@@ -36,15 +36,16 @@ test_mount() {
|
||||
_test_write() {
|
||||
local testfile="$mountpoint/.writetest_$$"
|
||||
if : >"$testfile" 2>/dev/null; then
|
||||
rm -f "$testfile" || true
|
||||
rm -f "$testfile" 2>/dev/null || true
|
||||
return 0
|
||||
else
|
||||
rm -f "$testfile" 2>/dev/null || true
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# First write test
|
||||
if _test_write; then
|
||||
if _test_write 2>/dev/null; then
|
||||
MOUNTED=true
|
||||
return 0
|
||||
fi
|
||||
@@ -56,7 +57,7 @@ test_mount() {
|
||||
|
||||
umount "$mountpoint" 2>/dev/null || true
|
||||
if mount_drive "$MOUNTOPTIONS"; then
|
||||
if _test_write; then
|
||||
if _test_write 2>/dev/null; then
|
||||
MOUNTED=true
|
||||
return 0
|
||||
fi
|
||||
@@ -70,7 +71,7 @@ test_mount() {
|
||||
|
||||
umount "$mountpoint" 2>/dev/null || true
|
||||
if mount_drive "$MOUNTOPTIONS"; then
|
||||
if _test_write; then
|
||||
if _test_write 2>/dev/null; then
|
||||
MOUNTED=true
|
||||
return 0
|
||||
fi
|
||||
@@ -78,7 +79,6 @@ test_mount() {
|
||||
fi
|
||||
|
||||
# ---- Final: mounted but not writable ----
|
||||
bashio::log.warning "Disk mounted but is not writable (permission denied). Marking as read-only."
|
||||
MOUNTED="readonly"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -9,35 +9,38 @@ set -e
|
||||
# Avoid usage of local dns such as adguard home or pihole\n"
|
||||
|
||||
if bashio::config.has_value 'DNS_server'; then
|
||||
# Define variables
|
||||
DNSSERVER=$(bashio::config 'DNS_server')
|
||||
DNS=""
|
||||
DNSLIST=""
|
||||
|
||||
# Get DNS servers
|
||||
# shellcheck disable=SC2086
|
||||
for server in ${DNSSERVER//,/ }; do # Separate comma separated values
|
||||
# Only add DNS if successful
|
||||
if ping -c 1 "$server" &> /dev/null; then
|
||||
DNS="${DNS}nameserver $server\n"
|
||||
DNSLIST="$server $DNSLIST"
|
||||
if ! bashio::config.is_true "openvpn_enabled" && ! bashio::config.is_true "wireguard_enabled"; then
|
||||
# Define variables
|
||||
DNSSERVER=$(bashio::config 'DNS_server')
|
||||
DNS=""
|
||||
DNSLIST=""
|
||||
|
||||
# Get DNS servers
|
||||
# shellcheck disable=SC2086
|
||||
for server in ${DNSSERVER//,/ }; do # Separate comma separated values
|
||||
# Only add DNS if successful
|
||||
if ping -c 1 "$server" &> /dev/null; then
|
||||
DNS="${DNS}nameserver $server\n"
|
||||
DNSLIST="$server $DNSLIST"
|
||||
else
|
||||
bashio::log.warning "DNS $server was requested but can't be pinged. It won't be used"
|
||||
fi
|
||||
done
|
||||
|
||||
# Only add DNS if there are DNS set
|
||||
# shellcheck disable=SC2236
|
||||
if [[ -n "${DNS:-}" ]]; then
|
||||
# Write resolv.conf
|
||||
# shellcheck disable=SC2059
|
||||
printf "${DNS}" > /etc/resolv.conf
|
||||
chmod 644 /etc/resolv.conf
|
||||
bashio::log.info "DNS SERVERS set to $DNSLIST"
|
||||
else
|
||||
bashio::log.warning "DNS $server was requested but can't be pinged. It won't be used"
|
||||
bashio::log.warning "No valid DNS were found. Using default router (or HA) dns servers."
|
||||
fi
|
||||
done
|
||||
|
||||
# Only add DNS if there are DNS set
|
||||
# shellcheck disable=SC2236
|
||||
if [[ -n "${DNS:-}" ]]; then
|
||||
# Write resolv.conf
|
||||
# shellcheck disable=SC2059
|
||||
printf "${DNS}" > /etc/resolv.conf
|
||||
chmod 644 /etc/resolv.conf
|
||||
bashio::log.info "DNS SERVERS set to $DNSLIST"
|
||||
else
|
||||
bashio::log.warning "No valid DNS were found. Using default router (or HA) dns servers."
|
||||
bashio::log.warning "DNS servers are enabled but a vpn is enabled. Resolv will be handled through the vpn script"
|
||||
fi
|
||||
|
||||
else
|
||||
bashio::log.info "DNS Servers option empty. Using default router (or HA) dns servers."
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
|
||||
## 4.0.16.2946-2 (2026-02-06)
|
||||
- Add ffmpeg to provide ffprobe for runtime detection (fixes https://github.com/alexbelgium/hassio-addons/issues/2451)
|
||||
|
||||
## 4.0.16.2946-1 (2026-01-08)
|
||||
- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/addons_config/sonarr to a folder only accessible from my Filebrowser addon called /addon_configs/xxx-sonarr_nas. This avoids the addon to mess with your homeassistant configuration folder, and allows to backup the options. Migration of data should be automatic. Please be sure to update all your links however ! For more information, see here : https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/
|
||||
|
||||
|
||||
@@ -57,7 +57,9 @@ RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_auto
|
||||
ENV PACKAGES="jq \
|
||||
curl \
|
||||
cifs-utils \
|
||||
keyutils nginx"
|
||||
keyutils \
|
||||
ffmpeg \
|
||||
nginx"
|
||||
|
||||
# Automatic apps & bashio
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
||||
|
||||
@@ -110,4 +110,4 @@ schema:
|
||||
slug: sonarr_nas
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/sonarr
|
||||
version: "4.0.16.2946-1"
|
||||
version: "4.0.16.2946-2"
|
||||
|
||||
Reference in New Issue
Block a user