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
Thom
ISPConfig Autoinstaller
Commits
e3cd8bfb
Commit
e3cd8bfb
authored
Oct 15, 2020
by
Marius Burkard
Browse files
- fixed --no-dns still setting local resolver and installing bind9, fixes #19
parent
46184687
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/os/class.ISPConfigDebianOS.inc.php
View file @
e3cd8bfb
...
@@ -119,10 +119,13 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
...
@@ -119,10 +119,13 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
'zip'
,
'zip'
,
'libnet-dns-perl'
,
'libnet-dns-perl'
,
'libdbd-mysql-perl'
,
'libdbd-mysql-perl'
,
'bind9'
,
'dnsutils'
'dnsutils'
);
);
if
(
ISPConfig
::
shallInstall
(
'dns'
))
{
$packages
[]
=
'bind9'
;
}
if
(
ISPConfig
::
shallInstall
(
'mail'
))
{
if
(
ISPConfig
::
shallInstall
(
'mail'
))
{
$packages
[]
=
'spamassassin'
;
$packages
[]
=
'spamassassin'
;
if
(
ISPConfig
::
wantsAmavis
())
{
if
(
ISPConfig
::
wantsAmavis
())
{
...
@@ -704,23 +707,26 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
...
@@ -704,23 +707,26 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
}
}
$this->restartService('unbound');
$this->restartService('unbound');
*/
*/
if
(
!
is_dir
(
'/etc/resolvconf/resolv.conf.d'
))
{
mkdir
(
'/etc/resolvconf/resolv.conf.d'
,
0755
);
}
$this
->
addLines
(
'/etc/resolvconf/resolv.conf.d/head'
,
'nameserver 127.0.0.1'
,
false
);
$cmd
=
'resolvconf -u 2>&1'
;
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
ISPConfigLog
::
info
(
'Checking local dns resolver.'
,
true
);
if
(
ISPConfig
::
shallInstall
(
'dns'
))
{
$cmd
=
'nslookup denic.de | grep Server'
;
if
(
!
is_dir
(
'/etc/resolvconf/resolv.conf.d'
))
{
$result
=
$this
->
exec
(
$cmd
);
mkdir
(
'/etc/resolvconf/resolv.conf.d'
,
0755
);
if
(
$result
===
false
)
{
}
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
$this
->
addLines
(
'/etc/resolvconf/resolv.conf.d/head'
,
'nameserver 127.0.0.1'
,
false
);
}
elseif
(
strpos
(
$result
,
'127.0.0.1'
)
===
false
)
{
$cmd
=
'resolvconf -u 2>&1'
;
ISPConfigLog
::
warn
(
'Unexpected resolver response: '
.
$result
,
true
);
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
ISPConfigLog
::
info
(
'Checking local dns resolver.'
,
true
);
$cmd
=
'nslookup denic.de | grep Server'
;
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
}
elseif
(
strpos
(
$result
,
'127.0.0.1'
)
===
false
)
{
ISPConfigLog
::
warn
(
'Unexpected resolver response: '
.
$result
,
true
);
}
}
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
...
@@ -1191,8 +1197,11 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
...
@@ -1191,8 +1197,11 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
'mysql'
,
'mysql'
,
'clamav-daemon'
,
'clamav-daemon'
,
'postfix'
,
'postfix'
,
'bind9'
,
);
);
if
(
ISPConfig
::
shallInstall
(
'dns'
))
{
$check_services
[]
=
'bind9'
;
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$check_services
[]
=
'pureftpd'
;
$check_services
[]
=
'pureftpd'
;
if
(
ISPConfig
::
$WEBSERVER
===
ISPC_WEBSERVER_APACHE
)
{
if
(
ISPConfig
::
$WEBSERVER
===
ISPC_WEBSERVER_APACHE
)
{
...
...
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