From 7d0629adf859bebbbefcfbc5dedb457b75a7ce00 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 1 Dec 2021 18:08:27 +0000 Subject: Use shadowing script for docker (#17846) Too many docker users are caught out by the default location for the app.ini file being environment dependent so that when they docker exec into the container the gitea commands do not work properly and require additional -c arguments to correctly pick up the configuration. This PR simply shadows the gitea binary using variants of the FHS compatible script to make the command gitea have the default locations by default. Fix #14468 Reference #17497 Reference #12082 Reference #8941 ... amongst others ... Replace #17501 Signed-off-by: Andrew Thornton --- contrib/fhs-compliant-script/gitea | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'contrib') diff --git a/contrib/fhs-compliant-script/gitea b/contrib/fhs-compliant-script/gitea index 019f838f92..ae1ae3cf14 100755 --- a/contrib/fhs-compliant-script/gitea +++ b/contrib/fhs-compliant-script/gitea @@ -1,8 +1,8 @@ #!/bin/bash -######################################################################## -# This script some defaults for gitea to run in a FHS compliant manner # -######################################################################## +############################################################################# +# This script sets some defaults for gitea to run in a FHS compliant manner # +############################################################################# # It assumes that you place this script as gitea in /usr/bin # @@ -36,7 +36,7 @@ if [ -z "$APP_INI_SET" ]; then CONF_ARG="-c \"$APP_INI\"" fi -# Provide FHS compliant defaults to -exec -a "$0" GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" "$GITEA" $CONF_ARG "$@" +# Provide FHS compliant defaults +GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" exec -a "$0" "$GITEA" $CONF_ARG "$@" -- cgit v1.2.3