Atera now supports running Bash script files for Mac and Linux devices. Scripts can be created either by uploading an existing script or by creating one online using the HTML editor in the Create Scripts form.
Create a Bash script
1. From Admin (on the sidebar), click Scripts to display the Scripts section.
2. Click Create script. The Create script window appears.
3. Click More script properties.
4. Enter the script parameters:
- *Script name: Enter the script name.
- *Script description: Enter the description.
- *File type: Select the file type.
- Category: Enter the category (previously-created categories will appear when typing).
- *Max script run time (minutes): Set the max run time.
- Arguments: Enter any arguments for the script (optional).
5. Enter the script in the Script editor.
Note: You can copy and paste text, script, or HTML code from your preferred editor into the script editor.
6. Click Create.
You can now run and schedule the script in Atera.
Upload a Bash script
1. From Admin (on the sidebar), click Scripts to display the Scripts section. Then click on Upload scripts.
The Scripts page appears.
2. Click Upload script.
The Upload script window appears.
3. Enter the script parameters:
- *Description: Enter the description.
- *Select file: Click Browse to find and input the script.
- Category: Enter the category (previously-created categories will appear when typing).
- *Max script run time (minutes): Set the max run time.
- Arguments: Enter any arguments for the script (optional).
- Run as: Select 'System' or 'Current user'.
4. Click Upload.
The script is uploaded and appears in your scripts library (My scripts tab).
Run a Bash script
This section describes running a Bash script:
- via the Agent Console
- via an IT automation profile
Run a Bash script via the Agent Console
1. From Devices, select the device.
2. From the Agent Console, click Manage > Run Script.
The Run Script window appears.
3. Find the script. Then click Run.
Note: You can run scripts from the My Scripts tab or the Shared Script Library tab.
The Script run summary window appears. For more information, see the Recent Processes Report
Run a Bash script via an IT automation profile
Important note: Using IT Automation profiles you can only run bash scripts on Mac agents. Currently, it is not possible to run bash scripts on Linux devices through IT Automation profiles.
1. From Admin (on the sidebar), click Patch Management and IT Automation, to display the Patch Management and IT Automation page.
2. Click Add profile at the bottom (or select an existing profile).
The Profile page appears.
3. Under Scripts, click Add script.
The Select script window appears.
4. Find the script. Then click Select.
Note: You can select scripts from the My Scripts tab only. To select scripts from the Shared Script Library, you need to first clone them and then select them from the My Scripts tab.
The script is added to the profile.
5. Click Save.
The profile is saved. The script will be executed on all Mac devices that have the IT automation profile applied to them. You can wait for the next scheduled run of the IT automation profile, or click Run now (top-right of the page) to execute the script on all associated devices immediately.