I have a service that is started by a script /etc/init.d/foo. When a certain CIFS share (//fileserver/multimedia on /home/username/multimedia type cifs) becomes unavailable for any reason (unmounted, network down, cosmic rays,...), then I want the service foo to be stopped automatically. When the share is available again, then I want the service foo to (re)start automatically.
My criterium for "available" is: being able to access the files on the share.
How do I do that?
showmount -e hostname– Raffa Apr 15 '22 at 16:18showmountis for NFS shares only, this is about a CIFS (Samba) share. – Amedee Van Gasse Apr 15 '22 at 19:29