| cd bbhverse | cd bbhverse | ||||
| npm i | npm i | ||||
| cd .. | cd .. | ||||
| git clone $REPOSERVER/$REPOOWNER/serververse | |||||
| git clone $REPOSERVER/$REPOOWNER/global-this | |||||
| git clone $REPOSERVER/$REPOOWNER/elxr.git | |||||
| # Define the repositories | |||||
| REPOS=("serververse" "global-this" "elxr") | |||||
| # Loop through each prereq repository | |||||
| for REPO in "${REPOS[@]}" | |||||
| do | |||||
| REPO_DIR="$REPO" # This will be the folder name after clone | |||||
| # Check if the repository directory exists | |||||
| if [ -d "$REPO_DIR" ]; then | |||||
| # If the directory exists, pull the latest changes | |||||
| echo "$REPO_DIR already exists. Pulling latest changes..." | |||||
| cd "$REPO_DIR" || exit | |||||
| git pull | |||||
| cd .. | |||||
| else | |||||
| # If the directory doesn't exist, clone the repository | |||||
| echo "Cloning $REPO_DIR..." | |||||
| git clone "$REPOSERVER/$REPOOWNER/$REPO.git" | |||||
| fi | |||||
| done | |||||
| # Install npm dependencies and link | # Install npm dependencies and link | ||||
| cd elxr | cd elxr | ||||
| echo "Module configuration generated for: $INSTANCENAME" | echo "Module configuration generated for: $INSTANCENAME" | ||||
| echo "module.exports = { instanceName : '$INSTANCENAME', reposerver: '$REPOSERVER', gitUser: '$GITUSER', gitEmail: '$GITEMAIL' }" > installchoices.js | echo "module.exports = { instanceName : '$INSTANCENAME', reposerver: '$REPOSERVER', gitUser: '$GITUSER', gitEmail: '$GITEMAIL' }" > installchoices.js | ||||
| if [[ "$OS_NAME" == "CentOS Linux" ]] || [[ "$OS_NAME" == "CentOS" ]] || [[ "$OS_NAME" == "Red Hat" ]]; then | |||||
| sudo dnf install redis -y | |||||
| else | |||||
| sudo apt install redis -y | |||||
| fi | |||||
| sudo systemctl start redis | |||||
| sudo systemctl enable redis | |||||
| # sudo systemctl status redis | |||||
| echo "Setup completed successfully!" | |||||
| # USE mysql; | # USE mysql; | ||||
| # ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'cihsr'; | # ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'cihsr'; | ||||
| bash elxr/mysql.init.sh | bash elxr/mysql.init.sh | ||||
| bash elxr/load.mysql.sh | bash elxr/load.mysql.sh | ||||
| bash elxr/i.sqlexpress.sh | bash elxr/i.sqlexpress.sh | ||||
| bash elxr/load.sqlexpress.sh | |||||
| bash elxr/load.sqlexpress.sh | |||||
| if [[ "$OS_NAME" == "CentOS Linux" ]] || [[ "$OS_NAME" == "CentOS" ]] || [[ "$OS_NAME" == "Red Hat" ]]; then | |||||
| sudo dnf install redis -y | |||||
| else | |||||
| sudo apt install redis -y | |||||
| fi | |||||
| sudo systemctl start redis | |||||
| sudo systemctl enable redis | |||||
| # sudo systemctl status redis |