Added ssl expiration

This commit is contained in:
TimZ99 2020-01-09 22:25:34 +01:00
parent a00f46a298
commit 8edd04a1a7
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
1 changed files with 18 additions and 0 deletions

View File

@ -263,6 +263,8 @@ class Installer
`telegram` enum('yes','no') NOT NULL default 'yes',
`warning_threshold` mediumint(1) unsigned NOT NULL DEFAULT '1',
`warning_threshold_counter` mediumint(1) unsigned NOT NULL DEFAULT '0',
`ssl_cert_expiry_days` mediumint(1) unsigned NOT NULL DEFAULT '0',
`ssl_cert_expired_time` varchar(255) NULL,
`timeout` smallint(1) unsigned NULL DEFAULT NULL,
`website_username` varchar(255) DEFAULT NULL,
`website_password` varchar(255) DEFAULT NULL,
@ -341,6 +343,9 @@ class Installer
if (version_compare($version_from, '3.4.2', '<')) {
$this->upgrade342();
}
if (version_compare($version_from, '3.4.6-beta.1', '<')) {
$this->upgrade346();
}
psm_update_conf('version', $version_to);
}
@ -655,4 +660,17 @@ class Installer
$queries[] = "ALTER TABLE `" . PSM_DB_PREFIX . "servers` CHANGE `last_output` `last_output` TEXT;";
$this->execSQL($queries);
}
/**
* Upgrade for v3.4.6 release
*/
protected function upgrade346()
{
$queries = array();
$queries[] = "ALTER TABLE `" . PSM_DB_PREFIX . "servers`
ADD `ssl_cert_expiry_days` MEDIUMINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `warning_threshold_counter`";
$queries[] = "ALTER TABLE `" . PSM_DB_PREFIX . "servers`
ADD `ssl_cert_expired_time` VARCHAR(255) NULL AFTER `ssl_cert_expiry_days`";
$this->execSQL($queries);
}
}