From de18ad8b36447c48b864731d3edca41e772aad9d Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Mon, 18 Dec 2023 23:50:44 +0100 Subject: [PATCH] #3872 adding "shrinkdebugfile=1" to bitcoin.conf (#4297) * #3872 adding shrinkdebugfile=1 --- home.admin/_bootstrap.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 2645feeb7..9bfb50108 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -897,8 +897,10 @@ else ################################ # LND and Blockchain Errors will be still in systemd journals - # /mnt/hdd/bitcoin/debug.log - rm /mnt/hdd/${network}/debug.log 2>/dev/null + # limit debug.log to 10MB on start - see #3872 + if [ $(grep -c "shrinkdebugfile=" < /mnt/hdd/bitcoin/bitcoin.conf) -eq 0 ];then + echo "shrinkdebugfile=1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf + fi # /mnt/hdd/lnd/logs/bitcoin/mainnet/lnd.log rm /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null # https://github.com/rootzoll/raspiblitz/issues/1700