cacert-devsetup/docker/apache-cats-foreground

18 lines
570 B
Text
Raw Permalink Normal View History

2020-12-22 15:51:13 +01:00
#!/bin/sh
set -eux
# Apache gets grumpy about PID files pre-existing
rm -f /run/apache2/apache2.pid
sed "s/@CATS_NORMAL_HOSTNAME@/${CATS_NORMAL_HOSTNAME}/g;
s/@CATS_SECURE_HOSTNAME@/${CATS_SECURE_HOSTNAME}/g;
s/@CATS_DB_HOSTNAME@/db/g;
s/@CATS_DB_USER@/${MYSQL_CATS_USER}/g;
s/@CATS_DB_PASSWORD@/${MYSQL_CATS_PASSWORD}/g;
s/@CATS_DATABASE@/${MYSQL_CATS_DATABASE}/g" \
/var/www/cats/includes/db_connect.inc.template > /var/www/cats/includes/db_connect.inc
apache2ctl start "$@"
exec tail -F --follow=name --retry /var/log/apache2/error.log