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

26 lines
512 B
Bash
Raw Normal View History

#!/bin/sh
set -e
2024-03-22 02:34:50 -05:00
# remove quotes from variable if present
2024-06-07 19:51:50 -05:00
NS_PROTO="${NS_PROTO%\"}"
NS_PROTO="${NS_PROTO#\"}"
2024-03-22 02:34:50 -05:00
2024-04-19 15:47:02 -05:00
# make lowercase
2024-06-07 19:51:50 -05:00
NS_PROTO=`echo $NS_PROTO | awk '{print tolower($0)}'`
2024-04-19 15:47:02 -05:00
2024-06-07 19:51:50 -05:00
if [ "$NS_PROTO" = "https" ]; then
2024-02-09 04:59:25 -05:00
echo "Using https configuration"
cp /etc/apache2/https.conf /etc/apache2/httpd.conf
2024-03-22 02:34:50 -05:00
else
echo "Using http configuration"
cp /etc/apache2/http.conf /etc/apache2/httpd.conf
fi
2024-03-22 02:34:50 -05:00
php ./docker/gen_config.php
echo "NarviSearch is running"
exec httpd -DFOREGROUND