Need IX-Systems definitive answer for shutdown commands

Its always been recommended to try and use the API calls for specific tasks on TrueNAS, even back on the CORE days. TrueNAS is not some generic BSD/Linux distro. It’s a pretty specifically built appliance, designed to be used through the UI and APIs. While there is access to a shell prompt, it is always recommended to use the API commands for those kinds of operations, since that’s how we test and validate the right things happen here internally. We don’t spend cycles wiring up every shell command (of which their are many) to hook back into the API to do the correct and tested shutdown procedures.

Calling the API will essentially run the exact shutdown procedure you would get had you clicked the “Shutdown” button in the UI. Calling that means as we make changes and improvements to the backend across new versions, your scripts will always be following the recommended and tested procedures for whatever task you are trying to automate.