mirror of
https://github.com/home-assistant/addons.git
synced 2025-07-20 16:57:09 +00:00
samba: Bind on enabled interfaces only (#4054)
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 12.5.2
|
||||
|
||||
- Avoid binding to disabled network interfaces
|
||||
|
||||
## 12.5.1
|
||||
|
||||
- Add configurations option to disable Apple devices interoperability. Disabling this setting might be required for file systems that do not support extended attributes such as exFAT.
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
version: 12.5.1
|
||||
version: 12.5.2
|
||||
slug: samba
|
||||
name: Samba share
|
||||
description: Expose Home Assistant folders with SMB/CIFS
|
||||
|
@ -26,7 +26,10 @@ bashio::log.info "Hostname: ${HOSTNAME}"
|
||||
|
||||
# Get supported interfaces
|
||||
for interface in $(bashio::network.interfaces); do
|
||||
interfaces+=("${interface}")
|
||||
interface_enabled=$(bashio::network.enabled "${interface}")
|
||||
if bashio::var.true "${interface_enabled}"; then
|
||||
interfaces+=("${interface}")
|
||||
fi
|
||||
done
|
||||
if [ ${#interfaces[@]} -eq 0 ]; then
|
||||
bashio::exit.nok 'No supported interfaces found to bind on.'
|
||||
|
@ -15,7 +15,7 @@
|
||||
log level = 1
|
||||
|
||||
bind interfaces only = yes
|
||||
interfaces = 127.0.0.1 {{ .interfaces | join " " }}
|
||||
interfaces = lo {{ .interfaces | join " " }}
|
||||
hosts allow = 127.0.0.1 {{ .allow_hosts | join " " }}
|
||||
|
||||
{{ if .compatibility_mode }}
|
||||
|
Reference in New Issue
Block a user