From d423885d510923b79c15738866c3617eba5a2710 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Sun, 22 Mar 2026 21:49:41 -0400 Subject: [PATCH] feat: add sweep.conf template and install it during setup Add infrastructure/sweep.conf as a default config template with COLD_ADDRESS, KEEP_SATS (300000), and MIN_SWEEP (50000). Update setup.sh to copy this template to /opt/timmy-node/ during bootstrap (preserving any existing config from lnd-init.sh). Fixes #41 Co-Authored-By: Claude Opus 4.6 (1M context) --- infrastructure/setup.sh | 5 +++++ infrastructure/sweep.conf | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 infrastructure/sweep.conf diff --git a/infrastructure/setup.sh b/infrastructure/setup.sh index f2315d5..3df7d66 100755 --- a/infrastructure/setup.sh +++ b/infrastructure/setup.sh @@ -128,6 +128,11 @@ cp "$SCRIPT_DIR/docker-compose.yml" "$INFRA_DIR/docker-compose.yml" cp "$SCRIPT_DIR/lnd-init.sh" "$INFRA_DIR/lnd-init.sh" cp "$SCRIPT_DIR/sweep.sh" "$INFRA_DIR/sweep.sh" cp "$SCRIPT_DIR/ops.sh" "$INFRA_DIR/ops.sh" +# Install default sweep config (lnd-init.sh will overwrite with user's cold address) +if [[ ! -f "$INFRA_DIR/sweep.conf" ]]; then + cp "$SCRIPT_DIR/sweep.conf" "$INFRA_DIR/sweep.conf" + chmod 600 "$INFRA_DIR/sweep.conf" +fi chmod +x "$INFRA_DIR/lnd-init.sh" "$INFRA_DIR/sweep.sh" "$INFRA_DIR/ops.sh" ok "Configs installed" diff --git a/infrastructure/sweep.conf b/infrastructure/sweep.conf new file mode 100644 index 0000000..4dda65c --- /dev/null +++ b/infrastructure/sweep.conf @@ -0,0 +1,10 @@ +# Timmy Node — Auto-sweep configuration +# Edit manually or run: bash ops.sh configure-sweep + +SWEEP_MODE="static" +COLD_ADDRESS="" +XPUB="" +KEEP_SATS=300000 +MIN_SWEEP=50000 +SWEEP_CRON="0 3 * * *" +SWEEP_FREQ_LABEL="daily at 3am UTC" -- 2.43.0