0

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.

2
  • I added the nfs tag on an assumption; remove or replace it if I’m wrong. Commented Jan 27, 2018 at 21:01
  • @JeffSchaller It can be NFS, it might as well be a Windows share or even e.g. sshfs Commented Jan 27, 2018 at 23:01

1 Answer 1

0

You may use autofs and test if the mountpoint provides some data or remains empty or you can test the NFS share availability:

unix.stackexchange.com/questions/176673/how-can-i-determine-if-an-nfs-remote-is-exporting-a-directory

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.