TrueNAS SCALE Version DocumentationThis content follows the TrueNAS SCALE 23.10 (Cobia) releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.
Init_Shutdown_Script
6 minute read.
Last Modified 2024-03-19 08:38 EDTThe SCALE CLI guide is a work in progress! New namespace and command documentation is continually added and maintained, so check back here often to see what is new!
The init_shutdown namespace has 5 commands, and is based on init/shutdown script functions found in the SCALE API and web UI. It provides access to init/shutdown script management methods through the init_shutdown namespace commands.
Init/shutdown scripts are capable of making OS-level changes and can be dangerous when done incorrectly. Use caution before creating script or command tasks.
Make sure you are comfortable with ZFS, Linux, and system configuration, backup, and restoration before creating and executing script tasks.
The following init_shutdown namespace commands allow you to create, view, update, and delete init/shutdown script tasks.
You can enter commands from the main CLI prompt or from the system namespace prompt.
The create
command creates a new init/shutdown script task.
Init/shutdown scripts allow you to run scripted tasks before or after initialization (start-up), or at shutdown.
All init/shutdown scripts run using sh(1)
.
The delete
command removes an existing init/shutdown script task.
The get_instance
command returns configured settings for an existing init/shutdown script task.
The query
command returns information about all existing init/shutdown script tasks on the system.
The update
command modifies configured settings for an existing init/shutdown script task.