summaryrefslogtreecommitdiffstats
path: root/usr/local/www/xmlrpc.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-04-02 07:01:28 +0000
committerColin Smith <colin@pfsense.org>2005-04-02 07:01:28 +0000
commit44488c3c043c29d5fc2f276c5cf18d8012226992 (patch)
tree2f3155be0279dabe549d9ad577608c18d66fa075 /usr/local/www/xmlrpc.php
parent719dd5fe9a33a06b3786897a24b8327532246706 (diff)
downloadpfsense-44488c3c043c29d5fc2f276c5cf18d8012226992.zip
pfsense-44488c3c043c29d5fc2f276c5cf18d8012226992.tar.gz
Expose pfsense.auto_update and pfsense.check_firmware_version.
Diffstat (limited to 'usr/local/www/xmlrpc.php')
-rwxr-xr-xusr/local/www/xmlrpc.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index fbb3824..2989749 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -125,6 +125,26 @@ function filter_configure_xmlrpc($raw_params) {
return new XML_RPC_Response(new XML_RPC_Value(true, 'boolean'));
}
+$check_firmware_version_doc = 'Basic XMLRPC wrapper for filter_configure. This method must be called with one paramater: a string containing the local system\'s password. This function will return the output of check_firmware_version upon completion.'
+$check_firmware_version_sig = array(array(string, string));
+
+function check_firmware_version_xmlrpc($raw_params) {
+ $params = xmlrpc_params_to_php($raw_params);
+ if(!xmlrpc_auth($params)) return new XML_RPC_Response(new XML_RPC_Value("auth_failure", 'string'))
+ return new XML_RPC_Response(new XML_RPC_Value(check_firmware_version(), 'string'));
+}
+
+
+$auto_update_doc = 'Basic XMLRPC wrapper for auto_update. This method must be called with one paramater: a string containing the local system\'s password. This function will return true upon completion.'
+$auto_update_sig = array(array(boolean, string));
+
+function auto_update_xmlrpc($raw_params) {
+ $params = xmlrpc_params_to_php($raw_params);
+ if(!xmlrpc_auth($params)) return new XML_RPC_Response(new XML_RPC_Value("auth_failure", 'string'))
+ auto_update();
+ return new XML_RPC_Response(new XML_RPC_Value(true, 'boolean'));
+}
+
$server = new XML_RPC_Server(
array(
'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc',
@@ -135,7 +155,13 @@ $server = new XML_RPC_Server(
'docstring' => $restore_config_section_doc),
'pfsense.filter_configure' => array('function' => 'filter_configure_xmlrpc',
'signature' => $filter_configure_sig,
- 'docstring' => $filter_configure_doc)
+ 'docstring' => $filter_configure_doc),
+ 'pfsense.check_firmware_version' => array('function' => 'check_firmware_version_xmlrpc',
+ 'signature' => $check_firmware_version_sig,
+ 'docstring' => $check_firmware_version_doc),
+ 'pfsense.auto_update' => array('function' => 'auto_update_xmlrpc',
+ 'signature' => $auto_update_sig,
+ 'docstring' => $auto_update_doc)
)
);
?>
OpenPOWER on IntegriCloud