USE_PROCD=1
smb_header() {
- local interface
- config_get interface $1 interface "loopback lan"
+ config_get samba_iface $1 interface "loopback lan"
# resolve interfaces
local interfaces=$(
. /lib/functions/network.sh
local net
- for net in $interface; do
+ for net in $samba_iface; do
local device
+ network_is_up $net || continue
network_get_device device "$net" && {
local subnet
network_get_subnet subnet "$net" && echo -n "$subnet "
config_foreach smb_add_share sambashare
}
-reload_service() {
- init_config
-
- killall -HUP smbd
-}
-
service_triggers() {
procd_add_reload_trigger samba
+
+ local i
+ for i in $samba_iface; do
+ procd_add_reload_interface_trigger $i
+ done
}
start_service() {
procd_open_instance
procd_set_param command /usr/sbin/smbd -F
procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
procd_close_instance
procd_open_instance
procd_set_param command /usr/sbin/nmbd -F
procd_set_param respawn
+ procd_set_param file /var/etc/smb.conf
procd_close_instance
}