Is it safe to use the following command to shut down StartOS via SSH:
sudo /usr/sbin/shutdown -h now
I’m planning to automate server shutdown via SSH when my UPS detects a power outage, but I want to make sure it does it in a way that will not corrupt the blockchain data (which is the reason for adding this in the first place, since power cuts do cause such data corruption).
If that is a bad way to do it, are there any recommendations for safely shutting down the server from another PC on the local network without going through the UI?
I’m not 100% sure, but I think halt is a little more violent, whereas sudo shutdown now I think is a bit more graceful, allowing things to stop and shut down first.
The -h is a relic of a bygone era. It’s no longer necessary, but still valid probably for compatibility purposed. On Debian, the result is exactly the same with or without it.
I think maybe the question was more along the lines as to if StartOS has any sort of specific shutdown sequence with regards to how containerized apps are gracefully terminated before shutdown, that might be skipped by someone using the shutdown command via terminal.
From @StuPleb 's answer it sounds like the answer is no, that there is no concern here.