mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 13:14:21 +01:00
[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:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user