2015-08-20 16:37:17 -03:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
2015-09-15 12:36:20 -03:00
|
|
|
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
|
|
|
|
|
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
|
2015-08-20 16:37:17 -03:00
|
|
|
<packagegui>
|
2015-09-15 12:36:20 -03:00
|
|
|
<copyright>
|
|
|
|
|
<![CDATA[
|
2015-08-20 16:37:17 -03:00
|
|
|
/*
|
2016-09-09 17:29:11 -03:00
|
|
|
* 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)
|
2016-09-09 17:29:11 -03:00
|
|
|
* 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.
|
|
|
|
|
*/
|
2015-09-15 12:36:20 -03:00
|
|
|
]]>
|
|
|
|
|
</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>
|
2015-08-20 16:37:17 -03:00
|
|
|
<include_file>/usr/local/pkg/shellcmd.inc</include_file>
|
2015-09-15 12:36:20 -03:00
|
|
|
<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>
|
2015-08-20 16:37:17 -03:00
|
|
|
<menu>
|
|
|
|
|
<name>Shellcmd</name>
|
|
|
|
|
<section>Services</section>
|
|
|
|
|
<configfile>shellcmd.xml</configfile>
|
2015-09-15 12:36:20 -03:00
|
|
|
<url>/pkg.php?xml=shellcmd.xml</url>
|
2015-08-20 16:37:17 -03:00
|
|
|
</menu>
|
2015-09-15 12:36:20 -03:00
|
|
|
<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>
|
2015-08-20 16:37:17 -03:00
|
|
|
<fields>
|
|
|
|
|
<field>
|
2015-09-15 12:36:20 -03:00
|
|
|
<type>listtopic</type>
|
|
|
|
|
<name>Shellcmd Configuration</name>
|
2015-08-20 16:37:17 -03:00
|
|
|
</field>
|
|
|
|
|
<field>
|
2015-09-15 12:36:20 -03:00
|
|
|
<fielddescr>Command</fielddescr>
|
|
|
|
|
<fieldname>cmd</fieldname>
|
2015-08-20 16:37:17 -03:00
|
|
|
<type>input</type>
|
2015-09-15 12:36:20 -03:00
|
|
|
<size>60</size>
|
|
|
|
|
<description>Enter the command to run.</description>
|
|
|
|
|
<required/>
|
2015-08-20 16:37:17 -03:00
|
|
|
</field>
|
2015-09-15 12:36:20 -03:00
|
|
|
<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>
|
2015-09-15 12:36:20 -03:00
|
|
|
</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>
|
2015-09-15 12:36:20 -03:00
|
|
|
]]>
|
|
|
|
|
</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>
|
2015-09-15 12:36:20 -03:00
|
|
|
<type>input</type>
|
|
|
|
|
<size>60</size>
|
|
|
|
|
</field>
|
|
|
|
|
</fields>
|
|
|
|
|
<custom_php_install_command>
|
|
|
|
|
shellcmd_import_config();
|
|
|
|
|
</custom_php_install_command>
|
2015-08-20 16:37:17 -03:00
|
|
|
<custom_php_resync_config_command>
|
|
|
|
|
shellcmd_sync_package();
|
|
|
|
|
</custom_php_resync_config_command>
|
2015-09-15 12:36:20 -03:00
|
|
|
<custom_delete_php_command>
|
|
|
|
|
shellcmd_delete_php_command();
|
2015-08-20 16:37:17 -03:00
|
|
|
</custom_delete_php_command>
|
2015-09-15 12:36:20 -03:00
|
|
|
<custom_php_validation_command>
|
|
|
|
|
shellcmd_validate_input($_POST, $input_errors);
|
|
|
|
|
</custom_php_validation_command>
|
2015-08-20 16:37:17 -03:00
|
|
|
</packagegui>
|