Archived
1
Fork 0
forked from Korbs/4get
This repository has been archived on 2024-09-29. You can view files and clone it, but cannot push or open issues or pull requests.
NarviSearch/docker/docker-entrypoint.sh
2024-04-19 13:47:20 -07:00

25 lines
618 B
Bash
Executable file

#!/bin/sh
set -e
# remove quotes from variable if present
FOURGET_PROTO="${FOURGET_PROTO%\"}"
FOURGET_PROTO="${FOURGET_PROTO#\"}"
# make lowercase
FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'`
if [ "$FOURGET_PROTO" = "https" ] || [ -f /etc/4get/certs/fullchain.pem ] || [ -f /etc/4get/certs/privkey.pem ]; then
echo "Using https configuration"
cp /etc/apache2/https.conf /etc/apache2/httpd.conf
else
echo "Using http configuration"
cp /etc/apache2/http.conf /etc/apache2/httpd.conf
fi
php ./docker/gen_config.php
echo "4get is running"
exec httpd -DFOREGROUND