Files

120 lines
4.3 KiB
XML
Raw Permalink Normal View History

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
<![CDATA[
/*
* shellcmd.xml
*
* part of pfSense (https://www.pfsense.org)
2025-01-07 11:46:29 -03:00
* Copyright (c) 2015-2025 Rubicon Communications, LLC (Netgate)
* Copyright (C) 2008 Mark J Crane
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
]]>
</copyright>
2015-12-03 07:40:11 -02:00
<name>shellcmdsettings</name>
2015-11-16 07:59:39 -02:00
<title>Services: Shellcmd Settings</title>
<include_file>/usr/local/pkg/shellcmd.inc</include_file>
<aftersaveredirect>/pkg.php?xml=shellcmd.xml</aftersaveredirect>
<addedit_string>[shellcmd] Successfully created/modified custom (early)shellcmd.</addedit_string>
<delete_string>[shellcmd] Successfully deleted custom (early)shellcmd.</delete_string>
<menu>
<name>Shellcmd</name>
<section>Services</section>
<configfile>shellcmd.xml</configfile>
<url>/pkg.php?xml=shellcmd.xml</url>
</menu>
<adddeleteeditpagefields>
<columnitem>
<fielddescr>Command</fielddescr>
<fieldname>cmd</fieldname>
</columnitem>
<columnitem>
<fielddescr>Shellcmd Type</fielddescr>
<fieldname>cmdtype</fieldname>
</columnitem>
<columnitem>
<fielddescr>Description</fielddescr>
<fieldname>description</fieldname>
</columnitem>
<addtext>Add a new (early)shellcmd entry</addtext>
<edittext>Edit this (early)shellcmd entry</edittext>
<deletetext>Delete this (early)shellcmd entry</deletetext>
</adddeleteeditpagefields>
<fields>
<field>
<type>listtopic</type>
<name>Shellcmd Configuration</name>
</field>
<field>
<fielddescr>Command</fielddescr>
<fieldname>cmd</fieldname>
<type>input</type>
<size>60</size>
<description>Enter the command to run.</description>
<required/>
</field>
<field>
<fielddescr>Shellcmd Type</fielddescr>
<fieldname>cmdtype</fieldname>
<type>select</type>
<options>
2017-02-22 17:14:13 +01:00
<option><name>shellcmd</name><value>shellcmd</value></option>
<option><name>earlyshellcmd</name><value>earlyshellcmd</value></option>
<option><name>afterfilterchangeshellcmd</name><value>afterfilterchangeshellcmd</value></option>
<option><name>disabled</name><value>disabled</value></option>
</options>
<description>
<![CDATA[
2017-02-22 17:14:13 +01:00
Choose the shellcmd type. Click Info for details.
<div class="infoblock">
<dl class="dl-horizontal responsive">
<dt>shellcmd</dt><dd>Will run the command specified towards the end of the boot process.</dd>
<dt>earlyshellcmd</dt><dd>Will run the command specified at the beginning of the boot process.</dd>
<dt>afterfilterchangeshellcmd</dt><dd>Will run after each <code>filter_configure()</code> call.
See <code>/etc/inc/filter.inc</code> source code for "documentation".<br/>
<span class="text-danger">Note:</span> Only one entry of this type can be configured!</dd>
<dt>disabled</dt><dd>Will save the command in package configuration but it will NOT run on boot.</dd>
</dl>
2021-01-06 15:44:02 -05:00
See <a href="https://docs.netgate.com/pfsense/en/latest/development/boot-commands.html">Executing commands at boot time</a> for detailed explanation.
2017-02-22 17:14:13 +01:00
</div>
]]>
</description>
<required/>
</field>
<field>
<fielddescr>Description</fielddescr>
<fieldname>description</fieldname>
2017-02-22 17:14:13 +01:00
<description>Enter a description for this command. (This is for your reference only.)</description>
<type>input</type>
<size>60</size>
</field>
</fields>
<custom_php_install_command>
shellcmd_import_config();
</custom_php_install_command>
<custom_php_resync_config_command>
shellcmd_sync_package();
</custom_php_resync_config_command>
<custom_delete_php_command>
shellcmd_delete_php_command();
</custom_delete_php_command>
<custom_php_validation_command>
shellcmd_validate_input($_POST, $input_errors);
</custom_php_validation_command>
</packagegui>