1234567891011121314151617181920 |
- #!/bin/bash
- replace_vars()
- {
- file="${1}"
- sed -e "s/POSTGRES_HOST/${POSTGRES_HOST}/" -i "${file}"
- sed -e "s/POSTGRES_USER/${POSTGRES_USER}/" -i "${file}"
- sed -e "s/POSTGRES_PASSWORD/${POSTGRES_PASSWORD}/" -i "${file}"
- sed -e "s/POSTGRES_DB/${POSTGRES_DB}/" -i "${file}"
- sed -e "s!IMAP_HOST!${IMAP_HOST}!" -i "${file}"
- sed -e "s!SMTP_HOST!${SMTP_HOST}!" -i "${file}"
- sed -e "s/SIEVE_HOST/${SIEVE_HOST}/" -i "${file}"
- sed -e "s/DES_KEY/${DES_KEY}/" -i "${file}"
- }
-
- replace_vars /var/www/html/config/config.inc.php
- replace_vars /var/www/html/plugins/password/config.inc.php
- replace_vars /var/www/html/plugins/vacation_sieve/config.inc.php
-
- rm -f /run/apache2/apache2.pid
- exec /usr/sbin/apache2ctl -D FOREGROUND
|