From OpenPLi Wiki
Jump to: navigation, search

OpenPLi allows you to have a menu to launch manually some custom shell scripts. You can access Ppanels from the blue button on your RCU.

In order to achieve this you first need to create the folder if it doesn't exist:

mkdir /var/etc/ppanels

Within this folder you need to create an .xml file to launch your script:

touch /var/etc/ppanels/MyScript.xml

Create the file /var/etc/ppanels/MyScript.xml with the following structure:

<directory name="MyScript">
<execute name="Launch your custom script"
			helptext="Sample to demonstrate how to launch a script."/>

directory name is the generic name of your script(s) in Ppanels first screen. execute name is the name displayed in Ppanels which will allows you to start the script. target is the script path and name to launch in this exemple script is MyScript.sh located in /var/script/ folder. helptext is an informational text which is displayed in the Ppanels.

If you need to propose severals scripts in the same directory name simply create one execute name entry for each scripts.

<directory name="MyScript">
<execute name="Launch your 1st script"
			helptext="Sample to demonstrate how to launch a 1st script."/>
<execute name="Launch your 2nd script"
			helptext="Sample to demonstrate how to launch a 2nd script."/>

You can also create several .xml files in the /var/etc/ppanels folder to logically split your different scripts.

If your script created files they will be placed into: /home/root folder so if you want the script to create files in a specific folder always specify the full file path in your scripts.

Remark: do not start your script with & at the end otherwise Ppanels will lose control on the script.