lsb_release -a; # tested under
Description: Debian GNU/Linux 10 (buster)

su - root
# create new file
touch /scripts/
chmod +x /scripts/

# edit and insert orange content
vim /scripts/ 
echo "=== shutdown as gracefully as possible ==="

# stop all vms
# /scripts/vboxmanage/ 

echo "... sending shutdown signal to nas"
ssh -v -p22 admin@ 'halt'

echo "... sync harddisks"
sync; sync; sync;

echo "... unmount mounts"
# this is where also nfs mounts should be
umount /media/user/*

echo "... shutting down system"
shutdown -h now;

# testedrive
# it should ask for password for NAS
# after that there should be a beep from the NAS indicating it will shutdown
# (takes a long time to shutdown ~10min) hurray it works! :)

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!