Update setup.sh

This commit is contained in:
borekon 2022-03-14 13:05:54 +01:00
parent 047568b93d
commit 74d874a3b0

View File

@ -2,6 +2,7 @@
RED="31" RED="31"
GREEN="32" GREEN="32"
BOLDGREEN="\e[1;${GREEN}m" BOLDGREEN="\e[1;${GREEN}m"
BOLDRED="\e[1;${RED}m"
ITALICGREEN="\e[3;${GREEN}m" ITALICGREEN="\e[3;${GREEN}m"
ITALICRED="\e[3;${RED}m" ITALICRED="\e[3;${RED}m"
ENDCOLOR="\e[0m" ENDCOLOR="\e[0m"
@ -12,7 +13,7 @@ if [ "$(whoami)" != "root" ]; then
fi fi
#Installs sury's php repository #Installs sury's php repository
${SUDO} apt update ${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} 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} 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 ${SUDO} apt update
@ -49,7 +50,7 @@ case ${answer:0:1} in
pause pause
;; ;;
* ) * )
echo -e Webmin "${RED}NOT${ENDCOLOR}" installed echo -e Webmin "${BOLDRED} NOT${ENDCOLOR}" installed
;; ;;
esac esac
read -p "Install pihole?(y/n) " answer read -p "Install pihole?(y/n) " answer
@ -62,7 +63,7 @@ case ${answer:0:1} in
pause pause
;; ;;
* ) * )
echo -e PiHole "${RED}NOT${ENDCOLOR}" installed echo -e PiHole "${BOLDRED} NOT${ENDCOLOR} " installed
;; ;;
esac esac
if [[ $WEBMIN != 0 ]] if [[ $WEBMIN != 0 ]]
@ -103,12 +104,9 @@ if [[ -d "/etc/lighttpd" ]]
${SUDO} systemctl start lighttpd ${SUDO} systemctl start lighttpd
;; ;;
* ) * )
echo -e SSL certificate was "${RED}NOT${ENDCOLOR}" installed echo -e SSL certificate was "${BOLDRED}NOT${ENDCOLOR}" installed
;; ;;
esac esac
echo Si
else else
echo No echo No
fi fi