Siduction Forum

Siduction Forum => Scripting & Kernelhacking => Topic started by: Lanzi on 2020/04/29, 11:12:43

Title: script that mounts NAS with nfs only when availble
Post by: Lanzi on 2020/04/29, 11:12:43
I do not know if this is complicated. Maybe it is not.
My NAS is sometimes switched off, but usually switched on.When I start one of my other computers it would be cool, if the mount the NAS if it's witched on and then mount it (i use nfs, because it seems the easiest and I do not have windows, so no need for samba).
i mount my nas with
Code: [Select]
mount 192.168.178.12:/Multimedia /home/user/NAS
Any ideas how I could do that?
Title: Re: script that mounts NAS with nfs only when availble
Post by: Carnophage on 2020/04/29, 12:32:09
I use systemd's automount options for something similar + auto unmount after idle, I configured mine based on https://wiki.archlinux.org/index.php/fstab#Automatic_unmount