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
Hj Ahmad Rasyid Hj Ismail
ISPConfig 3
Commits
181f4f1c
Commit
181f4f1c
authored
Nov 03, 2022
by
Hj Ahmad Rasyid Hj Ismail
Browse files
Merge branch 'develop-patch1' into 'develop'
Update installer_base.lib.php See merge request
!3
parents
20a04da2
6ed03fd4
Pipeline
#12589
passed with stage
in 8 minutes and 20 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
install/lib/installer_base.lib.php
View file @
181f4f1c
...
...
@@ -3196,16 +3196,18 @@ class installer_base {
$acme_version
=
'--server https://acme-v0'
.
((
$le_version
>=
0.22
)
?
'2'
:
'1'
)
.
'.api.letsencrypt.org/directory'
;
$certonly
=
'certonly --agree-tos --non-interactive --expand --rsa-key-size 4096'
;
// If this is a webserver
if
(
$conf
[
'nginx'
][
'installed'
]
==
true
||
$conf
[
'apache'
][
'installed'
]
==
true
)
{
exec
(
"
$le_client
$certonly
$acme_version
--authenticator webroot --webroot-path /usr/local/ispconfig/interface/acme --email "
.
escapeshellarg
(
'postmaster@'
.
$hostname
)
.
" -d "
.
escapeshellarg
(
$hostname
)
.
"
$renew_hook
"
,
$out
,
$ret
);
}
// Else, it is not webserver, so we use standalone
else
{
exec
(
"
$le_client
$certonly
$acme_version
--standalone --email "
.
escapeshellarg
(
'postmaster@'
.
$hostname
)
.
" -d "
.
escapeshellarg
(
$hostname
)
.
"
$hook
"
,
$out
,
$ret
);
if
((
!@
is_dir
(
$acme_cert_dir
)
||
!@
file_exists
(
$check_acme_file
))
&&
$ip_address_match
==
true
)
{
// If this is a webserver
if
(
$conf
[
'nginx'
][
'installed'
]
==
true
||
$conf
[
'apache'
][
'installed'
]
==
true
)
{
exec
(
"
$le_client
$certonly
$acme_version
--authenticator webroot --webroot-path /usr/local/ispconfig/interface/acme --email "
.
escapeshellarg
(
'postmaster@'
.
$hostname
)
.
" -d "
.
escapeshellarg
(
$hostname
)
.
"
$renew_hook
"
,
$out
,
$ret
);
}
// Else, it is not webserver, so we use standalone
else
{
exec
(
"
$le_client
$certonly
$acme_version
--standalone --email "
.
escapeshellarg
(
'postmaster@'
.
$hostname
)
.
" -d "
.
escapeshellarg
(
$hostname
)
.
"
$hook
"
,
$out
,
$ret
);
}
}
if
(
$ret
==
0
)
{
if
(
$ret
==
0
||
@
is_dir
(
$acme_cert_dir
)
||
@
file_exists
(
$check_acme_file
)
)
{
// certbot returns with 0 on issue for already existing certificate
$acme_cert_dir
=
'/etc/letsencrypt/live/'
.
$hostname
;
...
...
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