-
Notifications
You must be signed in to change notification settings - Fork 1
/
run-httpd.sh
executable file
·28 lines (22 loc) · 957 Bytes
/
run-httpd.sh
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
#!/bin/bash
# Make sure we're not confused by old, incompletely-shutdown httpd
# context after restarting the container. httpd won't start correctly
# if it thinks it is already running.
rm -rf /run/httpd/* /tmp/httpd*
if [ -f /config/davrods-vhost.conf ]; then
if [ -f /etc/httpd/conf.d/davrods-vhost.conf ]; then
cp /etc/httpd/conf.d/davrods-vhost.conf /etc/httpd/conf.d/davrods-vhost.conf.org
fi
cp /config/davrods-vhost.conf /etc/httpd/conf.d/davrods-vhost.conf
chmod 0644 /etc/httpd/conf.d/davrods-vhost.conf
fi
if [ -f /config/irods_environment.json ]; then
cp /config/irods_environment.json /etc/httpd/irods/irods_environment.json
chmod 0644 /etc/httpd/irods/irods_environment.json
fi
# Start filebeat
/etc/init.d/filebeat start
# start the apache daemon
exec /usr/sbin/apachectl -DFOREGROUND
# this script must end with a persistent foreground process
tail -F apache.access.log /var/log/httpd/apache.error.log