forked from 42ways/docker-rt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
38 lines (29 loc) · 873 Bytes
/
entrypoint.sh
File metadata and controls
38 lines (29 loc) · 873 Bytes
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
#!/bin/bash
set -e
cp /data/RT_SiteConfig.pm /opt/rt4/etc/RT_SiteConfig.pm
chown rt-service:www-data /opt/rt4/etc/RT_SiteConfig.pm
chmod 0640 /opt/rt4/etc/RT_SiteConfig.pm
if [[ -z "$RT_HOSTNAME" ]]; then
echo >&2 "You must specify RT_HOSTNAME."
exit 1
fi
if [[ -z "$RT_RELAYHOST" ]]; then
echo >&2 "You must specify RT_RELAYHOST."
exit 1
fi
#sed -i -e "s=HOSTNAME=$RT_HOSTNAME=" /etc/lighttpd/conf-available/89-rt.conf
cat >> /opt/postfix.sh <<EOF
#!/bin/bash
service postfix start
touch /var/log/mail.log
tail -f /var/log/mail.log
EOF
chmod +x /opt/postfix.sh
postconf -e myhostname="$RT_HOSTNAME"
postconf -e inet_interfaces=loopback-only
postconf -e inet_protocols=ipv4
postconf -e mydestination="$RT_HOSTNAME",localhost
postconf -e myhostname="$RT_HOSTNAME"
postconf -e mynetworks=127.0.0.0/8
postconf -e relayhost="$RT_RELAYHOST"
exec "$@"