Skip to content

Commit ffc0c72

Browse files
authored
Merge pull request #38 from dappnode/marc/add-extra-opts
add extra opts
2 parents 14f8db3 + 8e905d2 commit ffc0c72

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ services:
1818
L1_PRIORITY_FEE_BUMP_PERCENTAGE: ""
1919
L1_FIXED_PRIORITY_FEE_PER_GAS: ""
2020
LOG_LEVEL: info
21+
EXTRA_OPTS: ""
2122
restart: unless-stopped
2223
volumes:
2324
sequencer-data: {}

sequencer/entrypoint.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ FLAGS=(
2020
# — Append fixed mode flags
2121
FLAGS+=(--archiver --node --sequencer)
2222

23+
# — Append any extra options provided by the user in EXTRA_OPTS
24+
# If EXTRA_OPTS is set, split it the same way the shell would and append
25+
# each resulting token to the FLAGS array. This preserves quoted groups.
26+
if [ -n "${EXTRA_OPTS:-}" ]; then
27+
# Disable pathname expansion while splitting
28+
set -f
29+
# shellcheck disable=SC2206
30+
# Use eval to allow users to provide quoted options like '--flag "some value"'
31+
eval "EXTRA_ARR=( $EXTRA_OPTS )"
32+
# Re-enable pathname expansion
33+
set +f
34+
35+
for opt in "${EXTRA_ARR[@]:-}"; do
36+
FLAGS+=("$opt")
37+
done
38+
fi
39+
2340
echo "[INFO - entrypoint] Starting sequencer with flags:"
2441
printf ' %q\n' "${FLAGS[@]}"
2542

0 commit comments

Comments
 (0)