summaryrefslogtreecommitdiff
path: root/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
authorthrowaway <developerthrowaway@protonmail.com>2023-08-24 20:50:05 -0500
committerlolcat <lolcat@no-reply@lolcat.ca>2023-08-24 20:50:05 -0500
commit232995bf0d4274f904044e6dd0dc8098757b4be3 (patch)
treed69d89a8a25b0c230a85703f319352088742db9b /docker/docker-entrypoint.sh
parent40e058a32a6e73e0afab55889302956ebf12d459 (diff)
add set -e and use exec to replace parent process to handle docker signals (#6)
use `exec` to turn httpd into parent process. This is important for docker signalling such as `docker stop ${container_id}` add `set -e` which stops the entrypoint script if any command exits with a non-zero exit code. Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/6 Co-authored-by: throwaway <developerthrowaway@protonmail.com> Co-committed-by: throwaway <developerthrowaway@protonmail.com>
Diffstat (limited to 'docker/docker-entrypoint.sh')
-rwxr-xr-xdocker/docker-entrypoint.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh
index 469f810..939e59b 100755
--- a/docker/docker-entrypoint.sh
+++ b/docker/docker-entrypoint.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+set -e
sed -i "s/ServerName.*/ServerName ${FOURGET_SERVER_NAME}/g" /etc/apache2/httpd.conf
sed -i "s/ServerAdmin.*/ServerAdmin ${FOURGET_SERVER_ADMIN_EMAIL}/g" /etc/apache2/httpd.conf
-httpd -DFOREGROUND
+exec httpd -DFOREGROUND