I made a 2 line script to let TVheadend TV recording wake my server (NAS) where it records to, so I can let the server sleep when it is not needed. Script is perfect, but...
For as long as the server is sleeping and hence this mount is unavailable, RPi is not communicative. Apparantly, the script works normally, and will wake the server to make recordings. Putty works.
RPi LE with TVH has a OS level mount to the server as per OE Wiki:
# /storage/.config/autostart.sh contains:
At the moment when the server (NAS) goes to sleep (and for the duration of it), both RPis are unresponsible. Depends on the starting position, they may work apparantly perfectly normal (if they were allready being used) or may be hanged (e.g. if Kodi restarted after server went to sleep).
I can connect with Putty and remain connected all the time regardles of the server state. I can do some things with putty, some not.
Is there a better way to mount the remote disk with LE n RPi? Ideally, automount when needed. This is pure LE RPi OS issue.
If I umount this share prior to the server going to sleep, all is perfect, both RPis work perfectly normal (not having acces to the external disk). After I wake my server, I mount it back with usual command, all is perfect but with the external disk.
But, how to make umounts and mounts after wakeup automatic? Or create a smarter automount than the one I am using now?