mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Check for suitable python version
This commit is contained in:
@@ -1115,6 +1115,8 @@ letsencrypt_title=Let's Encrypt Certificate Request
|
||||
letsencrypt_err=Failed to request certificate
|
||||
letsencrypt_ecmds=Neither the Let's Encrypt client command <tt>letsencrypt-auto</tt> or the <tt>python</tt> command were found on your system
|
||||
letsencrypt_epythonmod=The Python module $1 needed by the built-in Let's Encrypt client is not installed
|
||||
letsencrypt_epythonver=Failed to get the Python version : $1
|
||||
letsencrypt_epythonver2=Python version $1 or above is required, but you only have version $2.
|
||||
letsencrypt_edroot=The Apache virtual host $1 has no document directory!
|
||||
letsencrypt_edom=Missing or invalid domain name
|
||||
letsencrypt_erenew=Missing or non-numeric renewal interval
|
||||
|
||||
@@ -39,6 +39,15 @@ my $out = &backquote_command("$python -c 'import argparse' 2>&1");
|
||||
if ($?) {
|
||||
return &text('letsencrypt_epythonmod', 'argparse');
|
||||
}
|
||||
my $ver = &backquote_command("$python --version 2>&1");
|
||||
if ($ver !~ /Python\s+([0-9\.]+)/) {
|
||||
return &text('letsencrypt_epythonver',
|
||||
"<tt>".&html_escape($out)."</tt>");
|
||||
}
|
||||
$ver = $1;
|
||||
if ($ver < 2.5) {
|
||||
return &text('letsencrypt_epythonver2', '2.5', $ver);
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user