forked from ucberkeley/Beehive
-
Notifications
You must be signed in to change notification settings - Fork 3
/
entrypoint.sh
executable file
·32 lines (26 loc) · 1.03 KB
/
entrypoint.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
29
30
31
32
#!/usr/bin/env bash
set -e
rm -f /application/tmp/pids/server.pid
cp /application/config/apache2/beehive* /etc/apache2/sites-available/
cp /application/config/apache2/ssl.conf /etc/apache2/mods-available/ssl.conf
cp /application/config/apache2/ports.conf /etc/apache2/ports.conf
cp /application/config/apache2/apache2.conf /etc/apache2/apache2.conf
cp /application/config/shibboleth/* /etc/shibboleth/
a2enmod ssl
a2enmod passenger
a2dissite 000-default
a2ensite beehive
a2ensite beehive-ssl
bundle exec whenever --update-crontab
/etc/init.d/cron start
# /usr/sbin/apache2ctl restart
if [ "$RAILS_ENV" = "production" ]
then
{ certbot -n --apache --agree-tos --redirect -m [email protected] -d beehive.berkeley.edu;
sed -i 's/SSLProtocol.*/SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1/g' /etc/letsencrypt/options-ssl-apache.conf;
/usr/sbin/apache2ctl restart; } &
else
echo "Running Development Environment"
fi
/etc/init.d/shibd restart -f -c /etc/shibboleth/shibboleth2.xml -p /var/run/shibboleth/shibd.pid
/usr/sbin/apache2ctl -DFOREGROUND