Init/Shutdown Scripts
2 minute read.
Last Modified 2021-03-24 14:35 EDTTrueNAS can schedule commands or scripts to run at system startup or shutdown. To create a new script, go to Tasks > Init/Shutdown Scripts and click ADD.
Init/Shutdown Script
Name | Description |
---|---|
Description | Comments about this script. |
Type | Select Command for an executable or Script for an executable script. |
Command | Enter the command with any options. When Script is selected, click the folder to define the path to the script file. |
When | Pre Init is early in the boot process, after mounting filesystems and starting networking. Post Init is at the end of the boot process, before TrueNAS services start. Shutdown is during the system power off process. |
Enabled | Enable this task. Unset to disable the task without deleting it. |
Timeout | Automatically stop the script or command after the specified seconds. |
Always test the script first to verify it is executable and achieves the desired results.
All init/shutdown scripts are run with sh
.
All saved Init/Shutdown tasks are shown in Tasks > Init/Shutdown Scripts. Click (Options) next to a task to EDIT or DELETE that task.