#!/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