Jump to content

Connect to a directory on a NAS server


straygrey

Recommended Posts

This is the type of thing where it would probably just be better to do this in a bash script, if the idea is that you want to mount the shared drive, test for the existence of a file, email if it's not there, and then unmount it.

Well there's mount and umount, which you should be able to test from the shell.  Add those to your script, and you can test for the existence of a file with:

 

#!/bin/bash
#mount share here
if [ ! -f /mountdir/backupfilename ]
then
    mail -s "Backup file missing" [email protected]
fi
#umount here

 

That's about all there is to it.  Stick in a cron for this at the appropriate time, and you should be covered.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.