docker-mailserver/target/scripts/startup
Brennan Kinney bdb35dd19a
chore: Refactor setup-stack.sh case SSL_TYPE=letsencrypt (#2278)
Mostly cleans up the code and documents it better, although there are some minor fixes for handling `SSL_DOMAIN` ENV and additional logging added for spotting issues related to it in future when troubleshooting.

Commits are scoped with context messages for easing review if necessary. Overview of changes:

Traefik specific:

- Logic extracted out into it's own function.
- Conditional reworked to assist with debugging.
- `SSL_DOMAIN` must not be empty when attempting to extract.
- Added additional notes.

`SSL_TYPE=letsencrypt` case:

- Revised top note block.
- Correct handling for `SSL_DOMAIN`.
- Removed some unnecessary nesting.
- Less repetitive error message for `LETSENCRYPT_DOMAIN`.
- Added use of panics where appropriate (kept `return 1` so failures still exit functionality early).
- Improved inline docs.
2021-11-03 09:12:33 +13:00
..
check-stack.sh function _defunc removed (#2199) 2021-09-23 19:49:07 +02:00
daemons-stack.sh function _defunc removed (#2199) 2021-09-23 19:49:07 +02:00
fixes-stack.sh Relaxed error handling (#2233) 2021-10-03 12:48:43 +00:00
misc-stack.sh fix: ONE_DIR=1 should keep correct permissions for spool-postfix (#2273) 2021-11-01 10:23:00 +13:00
setup-stack.sh chore: Refactor setup-stack.sh case SSL_TYPE=letsencrypt (#2278) 2021-11-03 09:12:33 +13:00