evertramos / docker-portainer-letsencrypt

Portainer docker container over SSL Certificate using Let's Encrypt automated by our webproxy docker-compose-letsencrypt-nginx-proxy
GNU Lesser General Public License v3.0
189 stars 52 forks source link

bug: error upon reading and writing env file via start.sh on MacOS #16

Closed codespearhead closed 10 months ago

codespearhead commented 10 months ago

Description

Special characters in env vars will throw errors upon being read depending on the shell. The cross-platform solution is described here.

A similar problem happens in the following line, which won't work on MacOS, for the reason described here.

https://github.com/evertramos/docker-portainer-letsencrypt/blob/13f4f866b45ef801d58a1ea28bf8f643c82effc6/start.sh#L42

I confirm that the version in this branch works in both MacOS and Linux if #12 is merged first, because the problem reported there will crash the program before it hits the troublesome line reported here.

Steps to Reproduce

./start.sh

Expected Behavior

No errors.

Current Behavior

WARN[0000] The "..." variable is not set. Defaulting to a blank string.
sed: 1: "./.env": invalid command code .