summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-05-30 17:05:53 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-05-30 17:17:39 +0200
commitda462c863441073ca429811bd1d023e929d611db (patch)
tree108f10a863b973f105dae3b32f79ee07a0980f6b /admin/WebConsole/includes
parent251bb977c45e89ff7bbf0d7c89ca1fb5a7296e69 (diff)
#915 adapt web console to use new reboot command in REST API
SocketHidra reboot has been replaced by POST /reboot.
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index ea4ad8bd..ea0fec85 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -12,6 +12,7 @@ define('OG_REST_CMD_SESSION', 'session');
define('OG_REST_CMD_RUN', 'shell/run');
define('OG_REST_CMD_OUTPUT', 'shell/output');
define('OG_REST_CMD_POWEROFF', 'poweroff');
+define('OG_REST_CMD_REBOOT', 'reboot');
define('OG_REST_PARAM_CLIENTS', 'clients');
define('OG_REST_PARAM_ADDR', 'addr');
@@ -145,6 +146,15 @@ function poweroff($string_ips) {
common_request(OG_REST_CMD_POWEROFF, POST, $data);
}
+function reboot($string_ips) {
+
+ $ips = explode(';',$string_ips);
+
+ $data = array(OG_REST_PARAM_CLIENTS => $ips);
+
+ common_request(OG_REST_CMD_REBOOT, POST, $data);
+}
+
/*
* @function multiRequest.
* @param URLs array (may include header and POST data), cURL options array.