Projects
Kolab:16:Testing
roundcubemail-selfcontained
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 80
View file
debian.tar.gz/roundcubemail.postinst
Changed
@@ -43,7 +43,7 @@ } migrate_config() { - /usr/share/roundcubemail/bin/migrateconfig.sh >/dev/null 2>&1 || : + php /usr/share/roundcubemail/bin/migrateconfig.sh >/dev/null 2>&1 || : } case "$1" in
View file
migrateconfig.sh
Changed
@@ -66,6 +66,30 @@ // TODO: removed `port` option from `ldap_public` array (non-standard port can be set via `host`) // TODO: removed `use_tls` option from `ldap_public` array (use tls:// prefix in `host`) +// For Kolab v4 we can just replace strings as we have a "constant" content +$replace = + "\$config'default_host' = (getenv('IMAP_TLS') == \"true\" ? \"ssl://\" : \"\") . getenv('IMAP_HOST');" + => "\$config'imap_host' = (getenv('IMAP_TLS') == \"true\" ? \"ssl://\" : \"\") . getenv('IMAP_HOST') . ':' . getenv('IMAP_PORT');", + "\$config'default_port' = getenv('IMAP_PORT');" => '', + "\$config'smtp_server' = \"tls://\" . getenv('SUBMISSION_HOST');" + => "\$config'smtp_host' = \"tls://\" . getenv('SUBMISSION_HOST') . ':' . getenv('SUBMISSION_PORT');", + "\$config'smtp_server' = getenv('SUBMISSION_HOST');" + => "\$config'smtp_host' = getenv('SUBMISSION_HOST') . ':' . getenv('SUBMISSION_PORT');", + "\$config'smtp_port' = getenv('SUBMISSION_PORT');" => '', +; + +$content = ''; +foreach (file("{$home}/config.inc.php") as $line) { + $line = str_replace(array_keys($replace), array_values($replace), $line); + if ($imap_host && strpos($line, "\$config'default_host'") !== false) { + $content .= "\$config'imap_host' = '{$imap_host}';\n"; + } elseif ($smtp_host && strpos($line, "\$config'smtp_server'") !== false) { + $content .= "\$config'smtp_host' = '{$smtp_host}';\n"; + } elseif (!preg_match("~\\\$config\\'(default_port|smtp_port)'\\~", $line)) { + $content .= $line; + } +} + file_put_contents("{$home}/config.inc.php", $content); // managesieve_usetls/managesieve_port
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.