1
Fork 0
forked from Korbs/4get
NarviSearch/docker/docker-entrypoint.sh
2024-06-07 20:51:50 -04:00

25 lines
512 B
Bash
Executable file

#!/bin/sh
set -e
# remove quotes from variable if present
NS_PROTO="${NS_PROTO%\"}"
NS_PROTO="${NS_PROTO#\"}"
# make lowercase
NS_PROTO=`echo $NS_PROTO | awk '{print tolower($0)}'`
if [ "$NS_PROTO" = "https" ]; 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 "NarviSearch is running"
exec httpd -DFOREGROUND