I have a linux web server (apache) that on boot (via fstab) attempts to mount a remote share (an mp3 directory) to a mount point in the wwwroot (so that i can access it with http://server/mp3s/
). The problem is, if the machine with the mp3s is off, I'd like it to try to reconnect every 15 minutes or so. I can implement this as a cron job, but don't know how I'd write a script that does this. Could someone write me a quick script that:
1. checks if //mp3comp/music is mounted
2. if not attempts to mount it
3. does not send errors connecting (if mp3comp off) to stderr or stdout, nor log them (just discard to /dev/null)
If it turns out to be a harder task then I think, that I'll raise the point reward accordingly.
Oh btw, If anyone has a better idea to solve my problem than I've proposed, I'm open to suggestions. I guess I could have mp3comp send some sort of initialization packet to the server when it boots, but I think that'd be much to complicated. Open to suggestions though.