Compare commits

..

1 Commits

Author SHA1 Message Date
057cafab61 feat: initial version
Some checks failed
Test Stalwart Installation Action / Installation with Admin Password (pull_request) Failing after 24s
Test Stalwart Installation Action / Full Configuration (Domains + Users) (pull_request) Failing after 26s
Test Stalwart Installation Action / Error Handling Tests (pull_request) Successful in 26s
Test Stalwart Installation Action / Basic Installation (No Config) (pull_request) Successful in 47s
Test Stalwart Installation Action / Test on Ubuntu ubuntu-20.04 (pull_request) Has been cancelled
Test Stalwart Installation Action / Test on Ubuntu ubuntu-22.04 (pull_request) Has been cancelled
Test Stalwart Installation Action / Test on Ubuntu ubuntu-24.04 (pull_request) Has been cancelled
Test Stalwart Installation Action / Test Summary (pull_request) Has been cancelled
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-02-14 23:49:21 -05:00
2 changed files with 3 additions and 9 deletions

View File

@@ -19,12 +19,9 @@ readonly RETRY_DELAY=2
# Read the generated password from installation # Read the generated password from installation
DEFAULT_ADMIN_PASSWORD="changeme" DEFAULT_ADMIN_PASSWORD="changeme"
if [ -f "${STALWART_PATH}/.init_password" ]; then if [ -f "${STALWART_PATH}/.init_password" ]; then
DEFAULT_ADMIN_PASSWORD=$(cat "${STALWART_PATH}/.init_password" | tr -d '\n\r') DEFAULT_ADMIN_PASSWORD=$(cat "${STALWART_PATH}/.init_password")
log_info "Using generated password from installation"
# Clean up the password file for security # Clean up the password file for security
rm -f "${STALWART_PATH}/.init_password" rm -f "${STALWART_PATH}/.init_password"
else
log_warning "Password file not found, using default password"
fi fi
readonly DEFAULT_ADMIN_PASSWORD readonly DEFAULT_ADMIN_PASSWORD

View File

@@ -123,15 +123,12 @@ main() {
# Extract the generated password from output # Extract the generated password from output
# Output format: "🔑 Your administrator account is 'admin' with password 'XXXXX'." # Output format: "🔑 Your administrator account is 'admin' with password 'XXXXX'."
local _generated_password local _generated_password
_generated_password=$(echo "$_init_output" | sed -n "s/.*with password '\([^']*\)'.*/\1/p") _generated_password=$(echo "$_init_output" | grep -oP "with password '\K[^']+" || echo "")
# Save the generated password for configure.sh to use # Save the generated password for configure.sh to use
if [ -n "$_generated_password" ]; then if [ -n "$_generated_password" ]; then
say "📝 Saving generated password for configuration..."
echo "$_generated_password" > "$_dir/.init_password" echo "$_generated_password" > "$_dir/.init_password"
chmod 644 "$_dir/.init_password" chmod 600 "$_dir/.init_password"
else
say "⚠️ Warning: Could not extract generated password"
fi fi
# Set permissions # Set permissions