deployment_ddcdn_multisite/bin/first_install.sh

34 lines
709 B
Bash

#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
# USER
echo -e "${PURPLE}${BOLD}Create a user ? (y/N) ${RESET}"
read answer
if [[ "$answer" == "y" ]]; then
. bin/first-install/create_user.sh
fi
# SSH
echo -e "${PURPLE}${BOLD}Setup SSH ? (y/N) ${RESET}"
read answer
if [[ "$answer" == "y" ]]; then
. bin/first-install/setup_ssh.sh
fi
# SWAP
echo -e "${PURPLE}${BOLD}Add SWAP ? (y/N) ${RESET}"
read answer
if [[ "$answer" == "y" ]]; then
. bin/first-install/add_swap.sh
fi
# FIREWALL AND FAIL2BAN
echo -e "${PURPLE}${BOLD}Setup Firewall and Fail2ban ? (y/N) ${RESET}"
read answer
if [[ "$answer" == "y" ]]; then
. bin/first-install/setup_firewall_fail2ban.sh
fi