#!/bin/sh /etc/rc.common
# SecuBox SMB/CIFS mount manager init script

START=90
STOP=15
USE_PROCD=1

start_service() {
	local enabled
	enabled="$(uci -q get smbfs.global.enabled)"
	[ "$enabled" = "1" ] || return 0

	/usr/sbin/smbfsctl mount-all
}

stop_service() {
	/usr/sbin/smbfsctl umount-all
}

reload_service() {
	stop_service
	start_service
}

service_triggers() {
	procd_add_reload_trigger "smbfs"
}
