From be0f53e0029aff5afdbb49ed4d294c72ee0ccfa2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 9 Jun 2022 11:49:03 +0200 Subject: [remoteaccess] Track unwakable machines, ignore restricted locations - Locations that are set to "never" or "only outside business hours" will not be considered during WOL, and not delivered to the guacamole proxy. - If we cannot wake as much machines per remote group as configured, we'll display a little number next to the WOL count setting. --- modules-available/remoteaccess/install.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules-available/remoteaccess/install.inc.php') diff --git a/modules-available/remoteaccess/install.inc.php b/modules-available/remoteaccess/install.inc.php index 2e248282..2a6fec36 100644 --- a/modules-available/remoteaccess/install.inc.php +++ b/modules-available/remoteaccess/install.inc.php @@ -8,6 +8,7 @@ $dbret[] = tableCreate('remoteaccess_group', " `wolcount` smallint(11) NOT NULL, `passwd` varchar(100) NOT NULL, `active` tinyint(1) UNSIGNED NOT NULL DEFAULT '1', + `unwoken` int(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`groupid`) "); @@ -67,4 +68,13 @@ if (!tableHasColumn('remoteaccess_machine', 'vncport')) { $dbret[] = UPDATE_DONE; } +// 2022-06-01 Unwoken machines: Keeps track of how many machines could not be WOLed +if (!tableHasColumn('remoteaccess_group', 'unwoken')) { + $ret = Database::exec("ALTER TABLE remoteaccess_group ADD COLUMN `unwoken` int(10) UNSIGNED NOT NULL DEFAULT '0'"); + if ($ret === false) { + finalResponse(UPDATE_FAILED, Database::lastError()); + } + $dbret[] = UPDATE_DONE; +} + responseFromArray($dbret); -- cgit v1.2.3-55-g7522