Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Create env file before doing port availability check (#963)
Leendert de Borst912c486266cf
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.ymlindex ffd613b3a..1dc01ce83 100644--- a/.github/workflows/docker-build.yml+++ b/.github/workflows/docker-build.yml@@ -200,7 +200,7 @@ jobs:if: ${{ !steps.install_script.outputs.skip_remaining }}run: |output=$(./install.sh reset-admin-password | sed 's/\x1b\[[0-9;]*m//g')- if ! echo "$output" | grep -E '^ Password: [A-Za-z0-9+/=]\{8,\}'; then+ if ! echo "$output" | grep -Eq '^\s*Password: [A-Za-z0-9+/=]{8,}'; thenecho "Invalid reset-admin-password output"exit 1- fi\ No newline at end of file+ fidiff --git a/install.sh b/install.shindex b3d8e0e5d..59eb64726 100755--- a/install.sh+++ b/install.sh@@ -370,6 +370,8 @@ get_port_config() {# Check if ports are available (not in use by non-AliasVault processes)check_port_availability() {+ create_env_file || { printf "${RED}> Failed to create .env file${NC}\n"; exit 1; }+printf "${CYAN}ℹ Checking port availability...${NC} "local ports_config@@ -541,7 +543,8 @@ check_port_availability() {fiif [ "$http_https_in_use" = true ]; then- printf " ${YELLOW}•${NC} Try stopping nginx/apache with 'sudo systemctl stop nginx apache2'\n"+ printf " ${YELLOW}•${NC} Try stopping the existing local webserver (e.g. nginx, apache, httpd etc.)\n"+ printf " ${YELLOW}•${NC} Change the default AliasVault ports (80, 443) in the .env file\n"fiprintf "\nIf this still doesn't work, try finding out which services are running on the specified ports and read documentation for your distribution on how to disable them.\n"@@ -1393,7 +1396,6 @@ handle_install() {# Function to handle buildhandle_build() {printf "${YELLOW}+++ Building AliasVault from source +++${NC}\n"- create_env_file || { printf "${RED}> Failed to create .env file${NC}\n"; exit 1; }# Set deployment mode to build to ensure container lifecycle uses build configurationset_deployment_mode "build"@@ -2102,7 +2104,6 @@ handle_install_version() {fiprintf "\n${YELLOW}+++ Installing AliasVault ${target_version} +++${NC}\n"- create_env_file || { printf "${RED}> Failed to create .env file${NC}\n"; exit 1; }# Initialize workspace which makes sure all required directories and files existinitialize_workspace