From da462c863441073ca429811bd1d023e929d611db Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 30 May 2019 17:05:53 +0200 Subject: #915 adapt web console to use new reboot command in REST API SocketHidra reboot has been replaced by POST /reboot. --- admin/WebConsole/includes/restfunctions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'admin/WebConsole/includes/restfunctions.php') 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. -- cgit v1.2.3-18-g5258