I' trying to add this command to a docker-compose file to modify sendmail config at startup:
bash -c 'sed -i.backup -e "/FEATURE(\`no_default_msa\')dnl/a define(\`SMART_HOST\', \`smtp.acme.priv\')dnl" /etc/mail/sendmail.mc'
It's just a regular sed, except sendmail config contains tons of single quotes and back quotes, so it returns this:
-su: syntax error near unexpected token `)'
I know it comes from quotes inside quotes. I tried to arrange it following some over thread, but it's a terrible mess.
Any bash guru specialized in escape characters here to help me?
Thanks!