forked from bylexus/docker-apache-php53
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun
More file actions
43 lines (39 loc) · 1.58 KB
/
run
File metadata and controls
43 lines (39 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
echo "$VIRTUAL_HOST" > /etc/mailname
if [ ! -f /firstrundone ]; then
if [ "$RELAY_HOST" != "" ]; then
sed -ri "s/^relayhost\s*=.*$//g" /etc/postfix/main.cf
echo "relayhost = $RELAY_HOST" >> /etc/postfix/main.cf
fi
if [ "$MASQ_DOMAINS" != "" ]; then
echo "masquerade_domains = $MASQ_DOMAINS" >> /etc/postfix/main.cf
fi
echo "smtp_generic_maps = hash:/etc/postfix/generic" >> /etc/postfix/main.cf
echo "root no-reply@$MASQ_DOMAINS" >> /etc/postfix/generic
postmap /etc/postfix/generic
echo "done" >> /firstrundone
fi
if [ "$MESSAGE_SIZE_LIMIT" != "" ]; then
postconf -e message_size_limit=$MESSAGE_SIZE_LIMIT
else
postconf -e message_size_limit=20480000
fi
if [ "$SECURE_COOKIE" == "true" ];
then
echo "Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure" > /etc/apache2/conf-available/headers.conf
a2enconf headers
a2enmod headers
fi
service postfix start
set -e
#PHP_ERROR_REPORTING=${PHP_ERROR_REPORTING:-"E_ALL & ~E_DEPRECATED & ~E_NOTICE"}
#sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/apache2/php.ini
#sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/cli/php.ini
#sed -ri "s/^error_reporting\s*=.*$//g" /etc/php5/apache2/php.ini
#sed -ri "s/^error_reporting\s*=.*$//g" /etc/php5/cli/php.ini
#echo "error_reporting = $PHP_ERROR_REPORTING" >> /etc/php5/apache2/php.ini
#echo "error_reporting = $PHP_ERROR_REPORTING" >> /etc/php5/cli/php.ini
cp -f /etc/php.ini /etc/php53/apache2/php.ini
cp -f /etc/php.ini /etc/php53/cli/php.ini
rm -f /var/run/apache2/*
source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND