Executing Custom Scripts
What is a Custom Script Configuration?
Custom script configuration in Endpoint Central enables administrators to establish and manage essential settings and tasks for their organization. This includes actions like adding sudo users, adding users to groups, changing user password, moving files, etc. These configurations can be applied to the Linux operating systems as Computer Configuration. These scripts offer more flexibility compared to standard options, allowing you to run scripts tailored to your specific requirements. They can be scheduled to run during Every Startup, Every Refresh Cycle, or just Once. It is important to select the configuration type as Computer based on the script's behavior.
Supported Language for Linux Custom Script
Linux supported script types - sh, bash, ksh, csh, tcsh, py.
In Endpoint Central, scripts must be added to the Script Repository before being deployed to end-machines. You can choose from the predefined script templates or add your own scripts to the repository.
How to Deploy a Custom Script Configuration?
- In the Endpoint Central console, navigate to Configurations > Add Configurations > Linux Configuration > Custom Script > Computer Configuration.
- Specify the Name and Description for the configuration
- You can execute the custom script using the Repository or Command line option.
- If you want to execute scripts that are available in the Script Repository, then you can proceed with the Repository option.
- Select the script from the Script Name field.
- Provide Script Arguments, if any
- Upload Dependency Files, if any
- Exit codes confirm if the script has been executed successfully. By default, it is 0. If you have any exit codes, you can specify them here. If there are multiple exit codes, separate them with commas [,].
- Else, if you want to run commands, then you can proceed with the Command Line option.
- Enter the command to be executed in the Command Line. To execute multiple commands, enter them separated by a semicolon [;].
- Upload Dependency Files, if any
- Exit codes confirm if the script has been executed successfully. By default, it is 0. If you have any exit codes, you can specify them here. If there are multiple exit codes, separate them with commas [,].
- Configure the Frequency as per your requirement from the options given below:
- Once: The script will be deployed once.
If you select Enable logging for troubleshooting, the executed script output will be logged and it will be displayed in the Remarks section under All configurations > Click on any configuration > Execution Status
- Every Startup:The script will be deployed during every system startup.If execute until is selected, then the script will be executed every system startup until the configured date and time.
- Every Refresh Cycle: The script will be executed every 90 minutes in the target machine
- Define the targets for the deployment.
- Specify retry options, if required
- You can also enable notifications to receive emails based on the specified frequency.
- Click on the Deploy/Deploy Immediately button to deploy the configuration in the target machines.
- To save the configuration as a draft or template for later use, click Save as
You have successfully added a Linux Computer-based Custom Script for your endpoints.