Commit 6aea175c authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '38-certbot-instead-acme' into 'master'

Resolve "Add function to install certbot instead of"

Closes #38

See merge request ispconfig/ispconfig-autoinstaller!14
parents 4f115450 0b8b8e2d
......@@ -173,6 +173,14 @@ class ISPConfig {
public static function wantsCertbot() {
if(isset($_GET['use-certbot']) && $_GET['use-certbot']) {
return true;
} else {
return false;
public static function wantsPHP() {
// If a new version is added, the getApacheModulesToDisable function should be updated to disable the latest version (this part could be improved)
$available_php_versions = array(
......@@ -272,6 +280,7 @@ Possible arguments are:
->ommiting the argument (use all versions)
--use-ftp-ports ->This option sets the passive port range for pure-ftpd. You have to specify the port range separated by hyphen, e. g. --use-ftp-ports=40110-40210.
->If not provided the passive port range will not be configured.
--use-certbot ->Use Certbot instead of for issuing Let\'s Encrypt certificates. Not adviced unless you are migrating from a old server that uses Certbot.
--no-web ->Do not use ISPConfig on this server to manage webserver setting and don\'t install nginx/apache or pureftpd. This will also prevent installing an ISPConfig UI and implies --no-roundcube as well as --no-pma
--no-mail ->Do not use ISPConfig on this server to manage mailserver settings. This will install postfix for sending system mails, but not dovecot and not configure any settings for ISPConfig mail. It implies --no-mailman.
--no-dns ->Do not use ISPConfig on this server to manage DNS entries. Bind will be installed for local DNS caching / resolving only.
......@@ -302,7 +311,7 @@ Possible arguments are:
$valid_args = array(
'help', 'debug', 'interactive',
'use-nginx', 'use-amavis', 'use-php', 'use-unbound', 'use-ftp-ports', 'channel', 'lang', 'unattended-upgrades',
'use-nginx', 'use-amavis', 'use-php', 'use-unbound', 'use-ftp-ports', 'use-certbot', 'unattended-upgrades', 'channel', 'lang',
'no-web', 'no-mail', 'no-dns', 'no-firewall', 'no-roundcube', 'no-pma', 'no-mailman', 'no-quota', 'no-ntp', 'no-local-dns',
......@@ -958,13 +958,18 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
ISPConfigLog::info('Installing letsencrypt (', true);
$cmd = 'cd /tmp ; wget -O - 2>/dev/null | sh 2>/dev/null';
$result = $this->exec($cmd);
if($result === false) {
ISPConfigLog::warn('Installing letsencrypt failed.', true);
if (ISPConfig::wantsCertbot()) {
ISPConfigLog::info('Installing Certbot (Let\'s Encrypt).', true);
} else {
ISPConfigLog::info('Letsencrypt installed.', true);
ISPConfigLog::info('Installing (Let\'s Encrypt).', true);
$cmd = 'cd /tmp ; wget -O - 2>/dev/null | sh 2>/dev/null';
$result = $this->exec($cmd);
if($result === false) {
ISPConfigLog::warn('Installation of (Let\'s Encrypt) failed.', true);
} else {
ISPConfigLog::info(' (Let\'s Encrypt) installed.', true);
$mailman_password = '';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment