deployment_dcdn_static/bin/set_url.sh

18 lines
655 B
Bash

#!/bin/bash
echo -e "${PURPLE}${BOLD}Enter the domain name of the website${RESET}"
read DOMAIN_NAME
get_ip
echo -e "${PURPLE}${BOLD}Configure the ${DOMAIN_NAME} DNS ZONE as the following${RESET}"
echo -e "${BLUE}Domain : ${DOMAIN_NAME} | Type : A | Target : ${ip}${RESET}"
echo -e "${BLUE}Domain : cms.${DOMAIN_NAME} | Type : A | Target : ${ip}${RESET}"
echo -e "${BLUE}Domain : www.${DOMAIN_NAME} | Type : A | Target : ${ip}${RESET}"
echo -e "${PURPLE}${BOLD}Press any key when done${RESET}"
read
REPO_DIRECTORY="/var/www/repositories"
mkdir $REPO_DIRECTORY
chown www-data:www-data $REPO_DIRECTORY
CMS_DIRECTORY="${REPO_DIRECTORY}/cms_${DOMAIN_NAME}"