Update setup.sh
This commit is contained in:
parent
047568b93d
commit
74d874a3b0
18
setup.sh
18
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
|
Loading…
Reference in New Issue
Block a user