Is there any way to automatically check if a network share is currently available or not, and if the state changed not only (un)mount it but perform any arbitrary other action? My best guess would be a cronjob, but maybe there's a better way for this.
-
I added the nfs tag on an assumption; remove or replace it if I’m wrong.Jeff Schaller– Jeff Schaller ♦2018-01-27 21:01:26 +00:00Commented Jan 27, 2018 at 21:01
-
@JeffSchaller It can be NFS, it might as well be a Windows share or even e.g. sshfsTobias Kienzler– Tobias Kienzler2018-01-27 23:01:29 +00:00Commented Jan 27, 2018 at 23:01
Add a comment
|
1 Answer
You may use autofs and test if the mountpoint provides some data or remains empty or you can test the NFS share availability: