Merge pull request #7 from turboaaa/patch-1

Replace add_config_value with native postconf
This commit is contained in:
Juan Luis Baptiste 2019-03-06 10:56:02 -05:00 committed by GitHub
commit 6342b77d16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
run.sh
View file

@ -10,9 +10,7 @@ function add_config_value() {
[ "${value}" == "" ] && echo "ERROR: No value set !!" && exit 1
echo "Setting configuration option ${key} with value: ${value}"
sed -i -e "/^#\?\(\s*${key}\s*=\s*\).*/{s//\1${value}/;:a;n;:ba;q}" \
-e "\$a${key}=${value}" \
${config_file}
postconf -e "${key} = ${value}"
}
[ -z "${SMTP_SERVER}" ] && echo "SMTP_SERVER is not set" && exit 1