From 0241e497a5443dbb02d2854f31bf6fb2af9e26fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Sun, 9 Aug 2020 18:29:06 +0200 Subject: [PATCH] adding smaller bugfixes, change letsencrpty --- README.md | 2 ++ app/Commands/LetsEncryptInstallCommand.php | 17 ++++++++++++++--- resources/nginx/nginx.blade.php | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index adfc7d9..a2953f0 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ git clone https://gitea.tentakelfabrik.de/Tentakelfabrik/mcp.git ```bash cd mcp sudo ./install.sh + +composer install ``` ## License diff --git a/app/Commands/LetsEncryptInstallCommand.php b/app/Commands/LetsEncryptInstallCommand.php index 44e376d..dd2ba1e 100644 --- a/app/Commands/LetsEncryptInstallCommand.php +++ b/app/Commands/LetsEncryptInstallCommand.php @@ -40,12 +40,23 @@ class LetsEncryptInstallCommand extends Command { $this->info('LetsEncrypt installing...'); + $output = []; exec('apt update 2>&1', $output); - exec('apt-get install software-properties-common 2>&1', $output); + exec('apt install software-properties-common 2>&1', $output); + + // @TODO apt add a Warning for no good, in a later version output will be scanned for helpfull infos + $this->line(implode("\n", Install::filterAptMessages($output))); + + $output = []; exec('add-apt-repository universe 2>&1', $output); exec('add-apt-repository ppa:certbot/certbot 2>&1', $output); - exec('apt-get update 2>&1', $output); - exec('apt-get install certbot python3-certbot-nginx 2>&1', $output); + + // @TODO apt add a Warning for no good, in a later version output will be scanned for helpfull infos + $this->line(implode("\n", Install::filterAptMessages($output))); + + $output = []; + exec('apt update 2>&1', $output); + exec('apt install certbot python3-certbot-nginx 2>&1', $output); // @TODO apt add a Warning for no good, in a later version output will be scanned for helpfull infos $this->line(implode("\n", Install::filterAptMessages($output))); diff --git a/resources/nginx/nginx.blade.php b/resources/nginx/nginx.blade.php index 51f0659..4deebc0 100644 --- a/resources/nginx/nginx.blade.php +++ b/resources/nginx/nginx.blade.php @@ -34,7 +34,7 @@ http { error_log /var/log/nginx.error_log warn; # no logging for 3XX - map \$status \$loggable { + map $status $loggable { ~^[3] 0; default 1; }