grommunio-web
grommunio-web copied to clipboard
variable plugin-urls
Ticket#81902
i think it would be beneficial to test for config-overrides in /etc/grommunio-admin-common/config.json
and apply them for any(not just archive like shown) plugin-url's to not run in any problems with multiple hosts or just different domainnames for some reason.
i mainly had the idea as i already have nextcloud-instances running and didn't want to install that on the mailserver.
cat /etc/grommunio-web/config-archive.php
<?php
define('PLUGIN_ARCHIVE_USER_DEFAULT_ENABLE', false);
try {
$adminconfig = file_get_contents('/etc/grommunio-admin-common/config.json');
$adminjson = json_decode($adminconfig, true);
}
catch (Exception $e) {
echo "blah";
}
if ( isset( $adminjson['archiveWebAddress'] ) ) {
define('PLUGIN_ARCHIVE_URL', $adminjson['archiveWebAddress']);
}
else
{
define('PLUGIN_ARCHIVE_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/archive/');
}
define('PLUGIN_ARCHIVE_AUTOSTART', false);
:see_no_evil: :hear_no_evil: :speak_no_evil: