Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
omv7:omv7_plugins:scripts [2024/04/20 08:05] – [Shared folder] chente | omv7:omv7_plugins:scripts [2024/05/03 15:45] (current) – [Installation] chente | ||
---|---|---|---|
Line 38: | Line 38: | ||
In OMV7's GUI:\\ | In OMV7's GUI:\\ | ||
Under **System**, **Plugins**, | Under **System**, **Plugins**, | ||
+ | |||
+ | * Installing the openmediavault-scripts plugin will also install the openmediavault-sharerootfs plugin as a dependency. | ||
+ | \\ | ||
+ | < | ||
+ | Warning | ||
+ | </ | ||
+ | Do not uninstall the openmediavault-sharerootfs plugin. It is a dependency of the openmediavault-scripts plugin. Uninstalling openmediavault-sharerootfs when the openmediavault-scripts plugin is installed will cause the openmediavault-scripts plugin to be uninstalled. | ||
+ | </ | ||
---- | ---- | ||
Line 72: | Line 80: | ||
=== Add === | === Add === | ||
- | {{ : | + | {{ : |
- | * Press the Add button to create a new script. A dialog box will open in which you must define the following fields: | + | * Press the **Add** button and in the submenu press the **Add** |
- | * Name: This is the name with which the script will be saved and which will be used for its execution. | + | |
- | * Extensión: This is the extension of the script. Depending on the type of script you want to create you can choose sh for bash, py for python, etc. | + | * **Extension**: This is the extension of the script. Depending on the type of script you want to create you can choose sh for bash, py for python, etc. |
- | * Script: In this field you must write the script code. You can paste text from the clipboard. | + | |
- | * Testing arguments: In this field you can optionally include arguments for the execution of the script. | + | |
- | * These arguments will be included in the execution of the script from the Script tab only, they will not be included in the execution of the script if it is executed from the Scheduled Jobs tab. | + | * These arguments will be included in the execution of the script from the **Script** tab only, they will not be included in the execution of the script if it is executed from the **Schedule** |
- | * Press the Save button to save. | + | * Press the **Save** button to save the created script. |
* The script will be stored in the OMV database | * The script will be stored in the OMV database | ||
- | * A copy of the script will be saved in the shared folder defined in the Settings tab. | + | * A copy of the script will be saved in the shared folder defined in the **Settings** tab. |
- | * A line with the script data will appear in the Scripts form. If you have defined arguments, they will appear in the corresponding column. | + | * A line with the script data will appear in the **Scripts** form. If you have defined arguments, they will appear in the corresponding column. |
+ | |||
+ | * Press the **Add** button and in the submenu press the **Import** button to import multiple scripts existing in the server file system at the same time. | ||
+ | * You can type the path to the folder where the scripts are or find the folder in the tree by clicking the icon on the right. It will not import any scripts that already exist in the plugin. | ||
+ | |||
+ | * Press the **Add** button and in the submenu press the **Import one** button to import a single script existing in the server file system. | ||
+ | * You can type the path to the file with the script in the **Path** field. Then press the **Import** button. | ||
---- | ---- | ||
Line 91: | Line 105: | ||
* A dialog box similar to creating a script will appear. | * A dialog box similar to creating a script will appear. | ||
* You can edit the script body and arguments. | * You can edit the script body and arguments. | ||
- | * Press the Save button to save the changes and exit or the Cancel Button to exit without saving. | + | * Press the **Save** button to save the changes and exit or the **Cancel** Button to exit without saving. |
---- | ---- | ||
Line 104: | Line 118: | ||
=== Run === | === Run === | ||
- | {{ : | + | {{ : |
* Select a script in the form (yellow color) and press the **Run** button on the toolbar to manually run the script. | * Select a script in the form (yellow color) and press the **Run** button on the toolbar to manually run the script. | ||
* A code box will appear where you can view the result of the script execution. | * A code box will appear where you can view the result of the script execution. | ||
* Press the **Start** button to run the script. | * Press the **Start** button to run the script. | ||
* You can stop the execution of the script at any time by pressing the **Stop** button. | * You can stop the execution of the script at any time by pressing the **Stop** button. | ||
+ | * Press **Close** to exit. | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | In this dialog box the output text of the script will be displayed.< | ||
+ | Dialogs generated with Bash Dialog or similar cannot be interacted with or displayed. | ||
+ | </ | ||
---- | ---- | ||
Line 130: | Line 151: | ||
=== Create === | === Create === | ||
- | {{ : | + | {{ : |
* Press the **Create** button on the toolbar to create a script schedule. | * Press the **Create** button on the toolbar to create a script schedule. | ||
* A dialog box will open to define the schedule. You must define the following fields: | * A dialog box will open to define the schedule. You must define the following fields: |