Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
1fc360df
Commit
1fc360df
authored
Oct 18, 2014
by
Till Brehm
Browse files
Added better dovecot version detection in Debian and Ubuntu installer.
parent
4ca1f82d
Changes
2
Hide whitespace changes
Inline
Side-by-side
install/dist/lib/debian60.lib.php
View file @
1fc360df
...
...
@@ -79,19 +79,20 @@ class installer extends installer_base {
//* Get the dovecot version
exec
(
'dovecot --version'
,
$tmp
);
$parts
=
explode
(
'.'
,
trim
(
$tmp
[
0
]));
$dovecot_version
=
$parts
[
0
];
$dovecot_version
=
$tmp
[
0
];
unset
(
$tmp
);
unset
(
$parts
);
//* Copy dovecot configuration file
if
(
$dovecot_version
=
=
2
)
{
if
(
version_compare
(
$dovecot_version
,
2
)
>
=
0
)
{
if
(
is_file
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian6_dovecot2.conf.master'
))
{
copy
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian6_dovecot2.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
}
else
{
copy
(
'tpl/debian6_dovecot2.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
}
replaceLine
(
$config_dir
.
'/'
.
$configfile
,
'postmaster_address = postmaster@example.com'
,
'postmaster_address = postmaster@'
.
$conf
[
'hostname'
],
1
,
0
);
if
(
version_compare
(
$dovecot_version
,
2.1
)
<
0
)
{
removeLine
(
$config_dir
.
'/'
.
$configfile
,
'ssl_protocols ='
);
}
}
else
{
if
(
is_file
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian6_dovecot.conf.master'
))
{
copy
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian6_dovecot.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
...
...
@@ -99,6 +100,8 @@ class installer extends installer_base {
copy
(
'tpl/debian6_dovecot.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
}
}
//* dovecot-sql.conf
$configfile
=
'dovecot-sql.conf'
;
...
...
install/lib/installer_base.lib.php
View file @
1fc360df
...
...
@@ -983,19 +983,20 @@ class installer_base {
//* Get the dovecot version
exec
(
'dovecot --version'
,
$tmp
);
$parts
=
explode
(
'.'
,
trim
(
$tmp
[
0
]));
$dovecot_version
=
$parts
[
0
];
$dovecot_version
=
$tmp
[
0
];
unset
(
$tmp
);
unset
(
$parts
);
//* Copy dovecot configuration file
if
(
$dovecot_version
=
=
2
)
{
if
(
version_compare
(
$dovecot_version
,
2
)
>
=
0
)
{
if
(
is_file
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian_dovecot2.conf.master'
))
{
copy
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian_dovecot2.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
}
else
{
copy
(
'tpl/debian_dovecot2.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
}
replaceLine
(
$config_dir
.
'/'
.
$configfile
,
'postmaster_address = postmaster@example.com'
,
'postmaster_address = postmaster@'
.
$conf
[
'hostname'
],
1
,
0
);
if
(
version_compare
(
$dovecot_version
,
2.1
)
<
0
)
{
removeLine
(
$config_dir
.
'/'
.
$configfile
,
'ssl_protocols ='
);
}
}
else
{
if
(
is_file
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian_dovecot.conf.master'
))
{
copy
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/debian_dovecot.conf.master'
,
$config_dir
.
'/'
.
$configfile
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment