Samba restart when USB device attached

Openwrt 19.7 samba
I have noteced that after a while if i attache USB disk to my router i cant get acess via network till i restart samba , So is there any way to /etc/inint.d/smb restart when usb device attached like a trigerred script or somthing like that