mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-06-27 16:35:58 +00:00
fix: forgejo-runner-service.sh must not leak the env to the runner
This commit is contained in:
parent
90ecfa1b29
commit
625965c739
1 changed files with 11 additions and 1 deletions
|
@ -159,6 +159,7 @@ EOF
|
|||
function inside() {
|
||||
local name=$(lxc_name)
|
||||
|
||||
# all exported variables must be --unset before running the daemon
|
||||
lxc-helpers.sh lxc_container_run $name -- sudo --user $LXC_USER_NAME \
|
||||
INPUTS_SERIAL="$INPUTS_SERIAL" \
|
||||
INPUTS_LXC_CONFIG="$INPUTS_LXC_CONFIG" \
|
||||
|
@ -245,7 +246,16 @@ function daemon() {
|
|||
rm -f stopped-* killed-*
|
||||
touch started-running
|
||||
set +e
|
||||
timeout --signal=SIGINT --kill-after=$KILL_AFTER $INPUTS_LIFETIME forgejo-runner --config config.yml daemon
|
||||
timeout --signal=SIGINT --kill-after=$KILL_AFTER $INPUTS_LIFETIME env \
|
||||
--unset INPUTS_SERIAL \
|
||||
--unset INPUTS_LXC_CONFIG \
|
||||
--unset INPUTS_TOKEN \
|
||||
--unset INPUTS_FORGEJO \
|
||||
--unset INPUTS_LIFETIME \
|
||||
--unset KILL_AFTER \
|
||||
--unset VERBOSE \
|
||||
--unset HOST \
|
||||
/usr/local/bin/forgejo-runner --config config.yml daemon
|
||||
case $? in
|
||||
0) touch stopped-gracefully ;;
|
||||
124) touch stopped-timeout ;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue