diff options
author | throwaway <developerthrowaway@protonmail.com> | 2024-03-22 00:34:50 -0700 |
---|---|---|
committer | throwaway <developerthrowaway@protonmail.com> | 2024-04-19 13:47:20 -0700 |
commit | 4afec792c4e7b4f9596443d83f7d43c86ceeb20d (patch) | |
tree | dacc640227b67a30000ad903dac423ab68af56a1 /docker | |
parent | 55a093925fbcca4bbee38f1185a6ccb1584fd4c3 (diff) |
update php and improve docker docs
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/docker-entrypoint.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 0a41ddd..ca0c4bc 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,14 +1,19 @@ #!/bin/sh set -e -if [ ! -f /etc/4get/certs/fullchain.pem ] || [ ! -f /etc/4get/certs/privkey.pem ]; then - echo "Using http configuration" - cp /etc/apache2/http.conf /etc/apache2/httpd.conf -else + +# remove quotes from variable if present +FOURGET_PROTO="${FOURGET_PROTO%\"}" +FOURGET_PROTO="${FOURGET_PROTO#\"}" + +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 -php82 ./docker/gen_config.php +php ./docker/gen_config.php echo "4get is running" |