[Samba] Remove lo interface (#2457)

* remove lo interface

* Update samba changelog and bump samba add-on version

* Exit with error if there are no supported interfaces

* Better error message
This commit is contained in:
Laszlo Magyar
2022-04-29 19:51:18 +02:00
committed by GitHub
parent 456bc0f70b
commit ce10622316
3 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,10 @@
# Changelog # Changelog
## 9.6.1
- Remove lo from interface list
- Exit with error if there are no supported interfaces to run Samba on
## 9.6.0 ## 9.6.0
- Run on all supported interfaces - Run on all supported interfaces

View File

@@ -1,5 +1,5 @@
--- ---
version: 9.6.0 version: 9.6.1
slug: samba slug: samba
name: Samba share name: Samba share
description: Expose Home Assistant folders with SMB/CIFS description: Expose Home Assistant folders with SMB/CIFS

View File

@@ -4,7 +4,7 @@
# ============================================================================== # ==============================================================================
declare password declare password
declare username declare username
declare -a interfaces declare -a interfaces=()
export HOSTNAME export HOSTNAME
# Check Login data # Check Login data
@@ -24,7 +24,9 @@ bashio::log.info "Hostname: ${HOSTNAME}"
for interface in $(bashio::network.interfaces); do for interface in $(bashio::network.interfaces); do
interfaces+=("${interface}") interfaces+=("${interface}")
done done
interfaces+=("lo") if [ ${#interfaces[@]} -eq 0 ]; then
bashio::exit.nok 'No supported interfaces found to bind on.'
fi
bashio::log.info "Interfaces: $(printf '%s ' "${interfaces[@]}")" bashio::log.info "Interfaces: $(printf '%s ' "${interfaces[@]}")"
# Generate Samba configuration. # Generate Samba configuration.