From 74d874a3b05954391e1ca08c18cd6aca7a7c95b0 Mon Sep 17 00:00:00 2001 From: borekon Date: Mon, 14 Mar 2022 13:05:54 +0100 Subject: [PATCH] Update setup.sh --- setup.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/setup.sh b/setup.sh index 7228072..46ee7a0 100644 --- a/setup.sh +++ b/setup.sh @@ -2,6 +2,7 @@ RED="31" GREEN="32" BOLDGREEN="\e[1;${GREEN}m" +BOLDRED="\e[1;${RED}m" ITALICGREEN="\e[3;${GREEN}m" ITALICRED="\e[3;${RED}m" ENDCOLOR="\e[0m" @@ -12,13 +13,13 @@ if [ "$(whoami)" != "root" ]; then fi #Installs sury's php repository ${SUDO} apt update -${SUDO} apt -y install apt-transport-https lsb-release ca-certificates vim sudo perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python curl certbot shared-mime-info fail2ban unzip git gpg +${SUDO} apt -y install apt-transport-https lsb-release ca-certificates vim sudo perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python certbot shared-mime-info fail2ban unzip git gpg ${SUDO} curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' ${SUDO} apt update read -p "Create user?(y/n)? " answer case ${answer:0:1} in - y|Y ) + y|Y) read -p "Enter username " USERNAME ${SUDO} adduser --gecos "" $USERNAME read -p "Should I add the new user to sudo group?(y/n)? " answer @@ -38,7 +39,7 @@ case ${answer:0:1} in esac echo -e "${ITALICGREEN}Configuring timezone to Madrid....${ENDCOLOR}" echo 'Europe/Madrid' | ${SUDO} tee /etc/timezone > /dev/null && ${SUDO} dpkg-reconfigure -f noninteractive tzdata > /dev/null -read -p "Install webmin?(y/n)" answer +read -p "Install webmin?(y/n) " answer case ${answer:0:1} in y|Y ) ${SUDO} sh -c 'echo "deb https://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list' @@ -49,10 +50,10 @@ case ${answer:0:1} in pause ;; * ) - echo -e Webmin "${RED}NOT${ENDCOLOR}" installed + echo -e Webmin "${BOLDRED} NOT${ENDCOLOR}" installed ;; esac -read -p "Install pihole?(y/n)" answer +read -p "Install pihole?(y/n) " answer case ${answer:0:1} in y|Y ) git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole @@ -62,7 +63,7 @@ case ${answer:0:1} in pause ;; * ) - echo -e PiHole "${RED}NOT${ENDCOLOR}" installed + echo -e PiHole "${BOLDRED} NOT${ENDCOLOR} " installed ;; esac if [[ $WEBMIN != 0 ]] @@ -103,12 +104,9 @@ if [[ -d "/etc/lighttpd" ]] ${SUDO} systemctl start lighttpd ;; * ) - echo -e SSL certificate was "${RED}NOT${ENDCOLOR}" installed + echo -e SSL certificate was "${BOLDRED}NOT${ENDCOLOR}" installed ;; esac - - - echo Si else echo No fi \ No newline at end of file