omv7:omv7_plugins:scripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
omv7:omv7_plugins:scripts [2024/04/20 06:52] – [Run] chenteomv7:omv7_plugins:scripts [2024/05/03 15:45] (current) – [Installation] chente
Line 17: Line 17:
 Warning Warning
 </span></strong></td></tr><tr><td style="background-color:#FFE4A6;height:25px;width:380px;"> </span></strong></td></tr><tr><td style="background-color:#FFE4A6;height:25px;width:380px;">
-A script has the potential to perform absolutely any action on your system. From damaging essential files to introducing a virus or hacking the server.<br>+<b>A script has the potential to perform absolutely any action on your system.</b> From damaging essential files to introducing a virus or hacking the server.<br>
 Be very careful about copying and running a third party script. If you don't know what exactly that script is doing, you may end up losing control of your server.<br> Be very careful about copying and running a third party script. If you don't know what exactly that script is doing, you may end up losing control of your server.<br>
 Use this plugin with this in mind. Use this plugin with this in mind.
Line 38: Line 38:
 In OMV7's GUI:\\ In OMV7's GUI:\\
 Under **System**, **Plugins**, find and highlight **openmediavault-scripts 7.X**, and click the **install** button. Under **System**, **Plugins**, find and highlight **openmediavault-scripts 7.X**, and click the **install** button.
 +
 +  * Installing the openmediavault-scripts plugin will also install the openmediavault-sharerootfs plugin as a dependency.
 +\\
 +<html><body><table width="100%" border="0"><tr><td colspan="2" style="background-color:#FFB663;height:30px;"><strong><span style="color:#FFFFFF;font-size:110%;">&#160; 
 +Warning 
 +</span></strong></td></tr><tr><td style="background-color:#FFE4A6;height:25px;width:380px;">
 +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.
 +</tr></table></body></html>
  
 ---- ----
Line 56: Line 64:
     * This file is just a backup copy of the script. Modifications made to this file manually will not be reflected in the OMV GUI and will be overwritten if you modify the script from the plugin GUI. Use the GUI to edit your script.     * This file is just a backup copy of the script. Modifications made to this file manually will not be reflected in the OMV GUI and will be overwritten if you modify the script from the plugin GUI. Use the GUI to edit your script.
   * Define the owner, the owner group, and the permissions that the files stored in this folder will have using the corresponding fields.   * Define the owner, the owner group, and the permissions that the files stored in this folder will have using the corresponding fields.
-  * Press Save.+  * Press **Save** button.
  
 ---- ----
Line 72: Line 80:
 === Add === === Add ===
  
-{{ :omv7:omv7_plugins:scripts03.jpg?direct&400|Add}} +{{ :omv7:omv7_plugins:scripts03.jpg?direct&600|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** button again to create a new script. A dialog box will open in which you must define the following fields: 
-    * Name: This is the name with which the script will be saved and which will be used for its execution. +    * **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. +    * **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. +    * **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** tab. 
-    * 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 ===
  
-{{ :omv7:omv7_plugins:scripts04.jpg?direct&400|Run}} +{{ :omv7:omv7_plugins:scripts04.jpg?direct&600|Run}} 
-  * Select a script on the form (yellow color) and press the **Run** button on the toolbar.+  * 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.
 +
 +<html><body><table width="100%" border="0"><tr><td colspan="2" style="background-color:#69A5FF;height:30px;"><strong><span style="color:#FFFFFF;font-size:110%;">&#160; Note
 +</span></strong></td></tr><tr><td style="background-color:#E6FEFF;height:25px;width:380px;">
 +In this dialog box the output text of the script will be displayed.<br>
 +Dialogs generated with Bash Dialog or similar cannot be interacted with or displayed.
 +</tr></table></body></html>
  
 ---- ----
Line 128: Line 149:
 ---- ----
  
-\\ +=== Create ===
-\\ +
-\\+
  
-.+{{ :omv7:omv7_plugins:scripts06.jpg?direct&600|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: 
 +    * Press **Enabled** to activate the scheduled execution of the script. 
 +    * In the **Script** field choose one of the scripts that you have previously created in the **Scripts** tab. 
 +    * In the **Script arguments** field you can optionally define arguments for the execution of the script in this schedule. 
 +      * Leave it blank if you don't need to define arguments. 
 +      * You can create different temporary schedules of the same script with different arguments. 
 +    * In the **Schedule** section define the temporary schedule for the execution of the script. 
 +      * In the example in the image you can see a temporary schedule defined to run on Sundays at 3:00 am. 
 +    * Press **Send command output via email** to receive an email after each execution of the script. 
 +      * You can add a comment in the **Comment** field. This comment will be the header of the email you will receive. 
 +      * You must configure notifications in the **System** > **Notification** tab for this to work.
  
-.+----
  
-.+=== Edit ===
  
-.+  * Select a script in the form (yellow color) and press the **Edit** button on the toolbar to edit a temporary schedule. 
 +    * An editing dialog box similar to the creation dialog box opens. You can edit all fields.
  
-DOCUMENT UNDER CONSTRUCTION+----
  
-.+=== Delete ===
  
-DOCUMENT UNDER CONSTRUCTION+  * Select a script in the form (yellow color) and press the **Delete** button on the toolbar to delete a temporary schedule. 
 +    * The selected temporary schedule will be deleted. The script or other temporary schedules of that script if they exist will not be removed.
  
-.+----
  
-DOCUMENT UNDER CONSTRUCTION+=== Run ===
  
-.+  * Select a script in the form (yellow color) and press the **Run** button on the toolbar to manually execute the selected temporary schedule at this time. 
 +    * A dialog box will open showing the execution of the script. 
 +    * You can run it by pressing the **Start** button. 
 +    * You can stop the execution at any time by pressing the **Stop** button. 
 +    * Press **Close** to exit.
  
-+----
- +
-.+
  
-. 
 \\ \\
 \\ \\
  • omv7/omv7_plugins/scripts.1713595946.txt.gz
  • Last modified: 2024/04/20 06:52
  • by chente