docker-entrypoint.sh 540 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. set -e
  3. # remove quotes from variable if present
  4. FOURGET_PROTO="${FOURGET_PROTO%\"}"
  5. FOURGET_PROTO="${FOURGET_PROTO#\"}"
  6. # make lowercase
  7. FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'`
  8. if [ "$FOURGET_PROTO" = "https" ]; then
  9. echo "Using https configuration"
  10. cp /etc/apache2/https.conf /etc/apache2/httpd.conf
  11. else
  12. echo "Using http configuration"
  13. cp /etc/apache2/http.conf /etc/apache2/httpd.conf
  14. fi
  15. php ./docker/gen_config.php
  16. echo "4get is running"
  17. exec httpd -DFOREGROUND