I have an SSHFS mount that I can connect using the command line:
echo myPassword | sudo sshfs email@example.com:/ /media/NAS -p31337 -o workaround=rename -o password_stdin -o allow_other
which seems to mount my NAS to
/media/NAS well enough.
Very occasionally the connection will be broken if there's a power or Internet outtage, and in these cases I would have to recognise this has happened and manually reconnect using the same command.
Is there a way I can get my Ubuntu Server to automatically attempt to reconnect, say every 30 seconds, if the connection goes down?