From 4793fe34b86dbc8ce54389e025cfe630e7ae95b5 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Mon, 1 Nov 2021 18:55:23 +0000 Subject: [PATCH] Use exec -a in the FHS compliant script If we exec gitea using an explicit `exec -a` we can set the name of the binary to the script's name thus ensuring all written calls by gitea will go via the script. Signed-off-by: Andrew Thornton --- contrib/fhs-compliant-script/gitea | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/fhs-compliant-script/gitea b/contrib/fhs-compliant-script/gitea index 28ce651aabb95..019f838f92218 100755 --- a/contrib/fhs-compliant-script/gitea +++ b/contrib/fhs-compliant-script/gitea @@ -37,6 +37,6 @@ if [ -z "$APP_INI_SET" ]; then fi # Provide FHS compliant defaults to -GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" "$GITEA" $CONF_ARG "$@" +exec -a "$0" GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" "$GITEA" $CONF_ARG "$@"