diff options
author | Simon Rettberg | 2020-05-15 17:24:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-05-15 17:29:16 +0200 |
commit | 426e574b85d363cd5a1fa256034dc2a281fc7272 (patch) | |
tree | d60738f67176e991dcd84d16079d85ff2168b243 /modules-available/remoteaccess/baseconfig/getconfig.inc.php | |
parent | [rebootcontrol] Wait until tasks finish (diff) | |
download | slx-admin-426e574b85d363cd5a1fa256034dc2a281fc7272.tar.gz slx-admin-426e574b85d363cd5a1fa256034dc2a281fc7272.tar.xz slx-admin-426e574b85d363cd5a1fa256034dc2a281fc7272.zip |
[remoteaccess] New module
Diffstat (limited to 'modules-available/remoteaccess/baseconfig/getconfig.inc.php')
-rw-r--r-- | modules-available/remoteaccess/baseconfig/getconfig.inc.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules-available/remoteaccess/baseconfig/getconfig.inc.php b/modules-available/remoteaccess/baseconfig/getconfig.inc.php new file mode 100644 index 00000000..2ebc97cb --- /dev/null +++ b/modules-available/remoteaccess/baseconfig/getconfig.inc.php @@ -0,0 +1,18 @@ +<?php + +// Locations from closest to furthest (order) +$locationId = ConfigHolder::get('SLX_LOCATIONS'); +if ($locationId !== false) { + $locationId = (int)$locationId; + $ret = Database::queryFirst("SELECT locationid FROM remoteaccess_x_location WHERE locationid = :lid", + ['lid' => $locationId], true); // TODO Remove true after next point release (2020-05-12) + if ($ret !== false) { + // TODO Properly merge + if (Property::get(RemoteAccess::PROP_TRY_VIRT_HANDOVER)) { + ConfigHolder::add("SLX_REMOTE_VNC", 'vmware virtualbox'); + } else { + ConfigHolder::add("SLX_REMOTE_VNC", 'x11vnc'); + } + ConfigHolder::add("SLX_REMOTE_HOST_ACCESS", Property::get(RemoteAccess::PROP_ALLOWED_VNC_NET)); + } +} |