aboutsummaryrefslogtreecommitdiffstats
path: root/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-02-01 22:53:06 -0500
committerlolcat <will@lolcat.ca>2025-02-01 22:53:06 -0500
commit36b0c570aaa27cd8ca7d7bc1ec9232339afc5d4e (patch)
treecfe8b1a638df98e5b3d23ed934a79f1938e610e2 /docker/docker-entrypoint.sh
parent47a7a2a224620bcbeea822c9201bc76c94f191fe (diff)
parent0180cf5224c8287975b1a091612887a9ca0256f6 (diff)
Merge branch 'master' of https://git.lolcat.ca/lolcat/4get
Diffstat (limited to 'docker/docker-entrypoint.sh')
-rwxr-xr-xdocker/docker-entrypoint.sh19
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage