2020-12-20 14:52:15 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# Apache gets grumpy about PID files pre-existing
|
|
|
|
rm -f /run/apache2/apache2.pid
|
|
|
|
|
2020-12-20 15:28:19 +01:00
|
|
|
cp /usr/local/etc/testca/certs/test.cacert.localhost.crt.pem /etc/ssl/certs/
|
|
|
|
cp /usr/local/etc/testca/certs/test.cacert.localhost.key.pem /etc/ssl/private/
|
2020-12-20 14:52:15 +01:00
|
|
|
(
|
|
|
|
openssl x509 -in /usr/local/etc/testca/class3/ca.crt.pem
|
|
|
|
openssl x509 -in /usr/local/etc/testca/root/ca.crt.pem
|
|
|
|
) >/etc/ssl/certs/combined.crt
|
|
|
|
|
2020-12-20 15:28:19 +01:00
|
|
|
cp /usr/local/etc/testca/certs/secure.test.cacert.localhost.crt.pem /etc/ssl/certs/
|
|
|
|
cp /usr/local/etc/testca/certs/secure.test.cacert.localhost.key.pem /etc/ssl/private/
|
2020-12-20 14:52:15 +01:00
|
|
|
|
|
|
|
sed -i "s/@MYSQL_USERNAME@/$MYSQL_APP_USER/g; s/@MYSQL_PASSWORD@/$MYSQL_APP_PASSWORD/g" \
|
|
|
|
/usr/local/etc/application/mysql.php
|
|
|
|
if [ ! -f /www/includes/mysql.php ]; then
|
|
|
|
rm -f /www/includes/mysql.php
|
|
|
|
cp /usr/local/etc/application/mysql.php /www/includes/mysql.php
|
|
|
|
fi
|
|
|
|
cp /usr/local/etc/application/feed.rss /www/pages/index/feed.rss
|
|
|
|
|
|
|
|
apache2ctl start "$@"
|
|
|
|
|
|
|
|
exec tail -F --follow=name --retry /var/log/apache2/error.log /var/log/apache2/phperror.log
|