diff options
| author | lolcat <will@lolcat.ca> | 2025-02-01 22:53:06 -0500 |
|---|---|---|
| committer | lolcat <will@lolcat.ca> | 2025-02-01 22:53:06 -0500 |
| commit | 36b0c570aaa27cd8ca7d7bc1ec9232339afc5d4e (patch) | |
| tree | cfe8b1a638df98e5b3d23ed934a79f1938e610e2 /docker/docker-entrypoint.sh | |
| parent | 47a7a2a224620bcbeea822c9201bc76c94f191fe (diff) | |
| parent | 0180cf5224c8287975b1a091612887a9ca0256f6 (diff) | |
Merge branch 'master' of https://git.lolcat.ca/lolcat/4get
Diffstat (limited to 'docker/docker-entrypoint.sh')
| -rwxr-xr-x | docker/docker-entrypoint.sh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 66d4067..53e7654 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -8,18 +8,27 @@ FOURGET_PROTO="${FOURGET_PROTO#\"}" # make lowercase FOURGET_PROTO=`echo $FOURGET_PROTO | awk '{print tolower($0)}'` +FOURGET_SRC='/var/www/html/4get' + +mkdir -p /etc/apache2 if [ "$FOURGET_PROTO" = "https" ]; then echo "Using https configuration" - cp /etc/apache2/https.conf /etc/apache2/httpd.conf + cp -r ${FOURGET_SRC}/docker/apache/https/httpd.conf /etc/apache2 + cp -r ${FOURGET_SRC}/docker/apache/https/conf.d/* /etc/apache2/conf.d + else echo "Using http configuration" - cp /etc/apache2/http.conf /etc/apache2/httpd.conf + cp -r ${FOURGET_SRC}/docker/apache/http/httpd.conf /etc/apache2 + cp -r ${FOURGET_SRC}/docker/apache/http/conf.d/* /etc/apache2/conf.d fi php ./docker/gen_config.php - -echo "4get is running" -exec httpd -DFOREGROUND +if [ "$@" = "start" ]; then + echo "4get is running" + exec httpd -DFOREGROUND +else + exec "$@" +fi |
