forked from lolcat/4get
1
0
Fork 0
4get/docker/docker-entrypoint.sh

22 lines
535 B
Bash
Raw Normal View History

#!/bin/sh
set -e
2024-03-22 07:34:50 +00:00
# remove quotes from variable if present
FOURGET_PROTO="${FOURGET_PROTO%\"}"
FOURGET_PROTO="${FOURGET_PROTO#\"}"
if [ "$FOURGET_PROTO" = "https" ] || [ -f /etc/4get/certs/fullchain.pem ] || [ -f /etc/4get/certs/privkey.pem ]; then
2024-02-09 09:59:25 +00:00
echo "Using https configuration"
cp /etc/apache2/https.conf /etc/apache2/httpd.conf
2024-03-22 07:34:50 +00:00
else
echo "Using http configuration"
cp /etc/apache2/http.conf /etc/apache2/httpd.conf
fi
2024-03-22 07:34:50 +00:00
php ./docker/gen_config.php
echo "4get is running"
exec httpd -DFOREGROUND