Update install-mailcow-debian.sh

This commit is contained in:
HHF Technology 2024-12-06 17:55:37 +05:30
parent 0be5a6f6d5
commit a18c44d4bc

View file

@ -166,7 +166,18 @@ if ! is_step_completed "mailcow_installed"; then
# Generate config if not already generated
if [ ! -f "$MAILCOW_DIR/mailcow.conf" ]; then
cd "$MAILCOW_DIR"
echo "$MAILCOW_HOSTNAME" | ./generate_config.sh
# Make sure generate_config.sh is executable
chmod +x generate_config.sh
# Create configuration file with proper permissions
su - dockeruser -c "cd $MAILCOW_DIR && echo \"$MAILCOW_HOSTNAME\" | ./generate_config.sh"
# Verify the configuration file was created
if [ ! -f "$MAILCOW_DIR/mailcow.conf" ]; then
log_message "Error: Failed to generate mailcow.conf"
exit 1
fi
echo "Would you like to edit the mailcow configuration? (y/N)"
read -n1 -r