diff options
Diffstat (limited to 'modules-available/remoteaccess/install.inc.php')
-rw-r--r-- | modules-available/remoteaccess/install.inc.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules-available/remoteaccess/install.inc.php b/modules-available/remoteaccess/install.inc.php index 11656218..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`) "); @@ -21,6 +22,7 @@ $dbret[] = tableCreate('remoteaccess_machine', " `machineuuid` char(36) CHARACTER SET ascii NOT NULL, `password` char(8) CHARACTER SET ascii NULL DEFAULT NULL, `woltime` int(10) UNSIGNED NOT NULL DEFAULT '0', + `vncport` smallint(5) UNSIGNED NOT NULL DEFAULT '5900', PRIMARY KEY (`machineuuid`) "); @@ -57,4 +59,22 @@ if (tableExists('remoteaccess_location') Database::exec("DROP TABLE remoteaccess_location"); } +// 2021-03-05: Add vncport column to machine table +if (!tableHasColumn('remoteaccess_machine', 'vncport')) { + $ret = Database::exec("ALTER TABLE remoteaccess_machine ADD COLUMN `vncport` smallint(5) UNSIGNED NOT NULL DEFAULT '5900'"); + if ($ret === false) { + finalResponse(UPDATE_FAILED, Database::lastError()); + } + $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); |