From 3dd0b60730ef9c16a78da6121a4140c9d6ad7afc Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 4 Sep 2020 22:24:19 +0100 Subject: [PATCH] quieter apt-get --- README.md | 4 ++-- install-local.sh | 2 +- scripts/debian10/install-apache2.sh | 4 +++- scripts/debian10/install-base.sh | 4 +++- scripts/debian10/install-dev-base.sh | 4 +++- scripts/debian10/install-mariadb.sh | 4 +++- scripts/debian10/install-mysql.sh | 4 +++- scripts/debian10/install-php.sh | 8 ++++++-- scripts/debian10/install-user.sh | 4 +++- 9 files changed, 27 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b2828b3..ac7318e 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,5 @@ Development environment base packages: ## TODO -* add verbose options to commands - * install-wordpress.sh - move virtual host to files/ +* install-wordpress.sh - move virtual host to files/ +* quieter make? diff --git a/install-local.sh b/install-local.sh index abfe485..a1f0f41 100755 --- a/install-local.sh +++ b/install-local.sh @@ -25,7 +25,7 @@ done echo "Updating .." ssh -T $ssh << EOSSH export DEBIAN_FRONTEND=noninteractive - apt-get update && apt-get upgrade + apt-get -qq -y update && apt-get -qq -y upgrade EOSSH echo "Update complete" diff --git a/scripts/debian10/install-apache2.sh b/scripts/debian10/install-apache2.sh index 658b920..dd69e9c 100755 --- a/scripts/debian10/install-apache2.sh +++ b/scripts/debian10/install-apache2.sh @@ -8,7 +8,9 @@ fi ssh -T $ssh << EOSSH echo "Installing Apache2" export DEBIAN_FRONTEND=noninteractive - apt-get install -y apache2 + echo "Installing packages .." + apt-get install -qq -y apache2 + echo "Packages installed" ufw allow in "WWW Full" sed -i '/export APACHE_RUN_USER=/c\export APACHE_RUN_USER='"$user" /etc/apache2/envvars diff --git a/scripts/debian10/install-base.sh b/scripts/debian10/install-base.sh index 50fd9fa..c7c35b3 100755 --- a/scripts/debian10/install-base.sh +++ b/scripts/debian10/install-base.sh @@ -8,7 +8,9 @@ sed -i '/PermitRootLogin/c\PermitRootLogin prohibit-password' /etc/ssh/sshd_conf systemctl restart sshd export DEBIAN_FRONTEND=noninteractive -apt-get install -y ufw || (echo "ERROR while installing ufw" ; exit 15) +echo "Installing packages .." +apt-get install -qq -y ufw || (echo "ERROR while installing ufw" ; exit 15) +echo "Packages installed" ufw allow ssh || (echo "Error while configuring ufw to allow ssh" ; exit 20 ) yes | ufw enable diff --git a/scripts/debian10/install-dev-base.sh b/scripts/debian10/install-dev-base.sh index c6089ee..1245cd7 100755 --- a/scripts/debian10/install-dev-base.sh +++ b/scripts/debian10/install-dev-base.sh @@ -6,7 +6,9 @@ ssh -T $ssh << EOSSH echo "Installing packages .." export DEBIAN_FRONTEND=noninteractive -apt-get -y install curl gnupg2 ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip fzf vim ctags +echo "Installing packages .." +apt-get -qq -y install curl gnupg2 ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip fzf vim ctags +echo "Packages installed" echo "Installing lazygit .." curl -fsSL https://github.com/jesseduffield/lazygit/releases/download/v0.22.1/lazygit_0.22.1_Linux_x86_64.tar.gz --output /tmp/lazygit.tar.gz diff --git a/scripts/debian10/install-mariadb.sh b/scripts/debian10/install-mariadb.sh index a6f5906..853b86e 100755 --- a/scripts/debian10/install-mariadb.sh +++ b/scripts/debian10/install-mariadb.sh @@ -15,7 +15,9 @@ ssh -T $ssh << EOSSH echo "Installing MariaDB" export DEBIAN_FRONTEND=noninteractive - apt-get install -y mariadb-server + echo "Installing packages .." + apt-get install -qq -y mariadb-server + echo "Packages installed" $_mysql_cmd "DELETE FROM mysql.user WHERE User='';" $_mysql_cmd "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" diff --git a/scripts/debian10/install-mysql.sh b/scripts/debian10/install-mysql.sh index 2356ec2..8a56266 100755 --- a/scripts/debian10/install-mysql.sh +++ b/scripts/debian10/install-mysql.sh @@ -15,7 +15,9 @@ ssh -T $ssh << EOSSH echo "Installing MySQL" export DEBIAN_FRONTEND=noninteractive - apt-get install -y mysql-server + echo "Installing packages .." + apt-get install -qq -y mysql-server + echo "Packages installed" $_mysql_cmd "DELETE FROM mysql.user WHERE User='';" $_mysql_cmd "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" diff --git a/scripts/debian10/install-php.sh b/scripts/debian10/install-php.sh index 2f8db2f..20f1a3a 100755 --- a/scripts/debian10/install-php.sh +++ b/scripts/debian10/install-php.sh @@ -10,8 +10,10 @@ if [ -n "$wp_user" ] ; then ssh -T $ssh << 'EOSSH' export DEBIAN_FRONTEND=noninteractive - apt-get install -y php libapache2-mod-php php-fpm php-bcmath php-curl php-gd php-imagick php-mbstring \ + echo "Installing packages .." + apt-get install -qq -y php libapache2-mod-php php-fpm php-bcmath php-curl php-gd php-imagick php-mbstring \ php-mysql php-soap php-xml php-zip + echo "Packages installed" _php_config_file=$(php --ini | grep Loaded | awk '{ print $4 }') sed -i '/memory_limit/c\memory_limit = 256M' "$_php_config_file" @@ -25,6 +27,8 @@ else ssh -T $ssh << EOSSH export DEBIAN_FRONTEND=noninteractive - apt-get install -y php libapache2-mod-php php-mysql + echo "Installing packages .." + apt-get install -qq -y php libapache2-mod-php php-mysql + echo "Packages installed" EOSSH fi diff --git a/scripts/debian10/install-user.sh b/scripts/debian10/install-user.sh index a57f8f6..070c353 100755 --- a/scripts/debian10/install-user.sh +++ b/scripts/debian10/install-user.sh @@ -32,7 +32,9 @@ ssh -T $ssh << EOSSH echo "Installing required packages .." export DEBIAN_FRONTEND=noninteractive - apt-get --assume-yes install sudo git tmux zsh curl + echo "Installing packages .." + apt-get -qq -y install sudo git tmux zsh curl + echo "Packages installed" echo "Cloning configuration files .." su --login "$user"