You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. #!/bin/bash
  2. replace_vars()
  3. {
  4. file="${1}"
  5. sed -e "s/POSTGRES_HOST/${POSTGRES_HOST}/" -i "${file}"
  6. sed -e "s/POSTGRES_USER/${POSTGRES_USER}/" -i "${file}"
  7. sed -e "s/POSTGRES_PASSWORD/${POSTGRES_PASSWORD}/" -i "${file}"
  8. sed -e "s/POSTGRES_DB/${POSTGRES_DB}/" -i "${file}"
  9. sed -e "s!IMAP_HOST!${IMAP_HOST}!" -i "${file}"
  10. sed -e "s!SMTP_HOST!${SMTP_HOST}!" -i "${file}"
  11. sed -e "s/SIEVE_HOST/${SIEVE_HOST}/" -i "${file}"
  12. sed -e "s/DES_KEY/${DES_KEY}/" -i "${file}"
  13. }
  14. replace_vars /var/www/html/config/config.inc.php
  15. replace_vars /var/www/html/plugins/password/config.inc.php
  16. replace_vars /var/www/html/plugins/vacation_sieve/config.inc.php
  17. rm -f /run/apache2/apache2.pid
  18. exec /usr/sbin/apache2ctl -D FOREGROUND