rioastamal / lightsail-miab-installer

a user-friendly command-line tool to streamline the setup of Mail-in-a-Box on Amazon Lightsail
MIT License
14 stars 3 forks source link

Unexpected EOF Syntax Error #7

Open emenella opened 5 months ago

emenella commented 5 months ago

Problem Description: When attempting to deploy Mail-in-a-Box on AWS using the lightsail-miab-installer.sh script, I encountered a syntax error preventing the script from executing properly. The reported error pertains to an unexpected EOF (End Of File), suggesting an issue with quotation mark handling within the script.

Command Executed: Please replace sh lightsail-miab-installer.sh \ --installation-id mail \ --az eu-west-3a \ --hostname mail.emenella.fr \ --email 'admin@emenella.fr' \ --password 'XXXxxxXXX' \ --instance-type 20_usd with the exact command you used to execute the script. For example, if you ran the script directly, it might look like this:

Steps to Reproduce the Error:

  1. Execute the lightsail-miab-installer.sh script on macOS Monterey version 12.7.2 (21G1974) using zsh.
  2. Observe the following error shortly after the script starts executing: lightsail-miab-installer.sh: line 1425: unexpected EOF while looking for matching `'' lightsail-miab-installer.sh: line 1540: syntax error: unexpected end of file

Execution Environment:

Expected Outcome: Resolution of the syntax issue to allow the script to execute correctly without errors.

Thank you in advance for your assistance and time spent addressing this issue.

rioastamal commented 5 months ago

@emenella in some environment sh in macOS refer to the old default Bash 3.2 which very old.

Try to run using zsh explicitly:

zsh lightsail-miab-installer.sh \ 
--installation-id mail \ 
--az eu-west-3a \ 
--hostname mail.emenella.fr \ 
--email 'admin@emenella.fr' \ 
--password 'XXXxxxXXX' \ 
--instance-type 20_usd

You may need to install additional tools which mentioned in README.md.