#!/bin/bash # Source the environment source configure_environment.sh # Check if password was configured if [[ -z "${ACT_DEPLOY_SERVER_PWD}" ]]; then echo -n "No password for database set. Please enter password: " IFS= read -r line echo -en "\n\nexport ACT_DEPLOY_SERVER_PWD=$line\n" >> configure_environment.sh export ACT_DEPLOY_SERVER_PWD=$line echo "Password set!" fi # Check if screen is installed if command -v screen >/dev/null 2>&1; then echo "Starting in screen session." screen bash -c 'source configure_environment.sh; actsim-cluster-agent -j$(nproc);' else echo "screen command not found. Starting in foreground." actsim-cluster-agent -j$(nproc) fi