aboutsummaryrefslogtreecommitdiffstats
path: root/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
authorthrowaway <developerthrowaway@protonmail.com>2025-01-24 00:53:34 -0800
committerthrowaway <developerthrowaway@protonmail.com>2025-01-24 00:53:34 -0800
commiteed32a153c862cec31d1353ea0ed6e01fc70b8da (patch)
treef1e4c3b7df3e1d06b1af387d4184e5b978a38957 /docker/docker-entrypoint.sh
parentf9f3c919d6df45da859ba46d3ba823e543ca636e (diff)
remove ssl.conf when using http config
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