remove deprecated config entries on update, add --db-upgrade

This commit is contained in:
openoms
2025-11-13 15:36:11 +01:00
parent 74e3ebe731
commit 8bbaba60a0

View File

@@ -325,7 +325,7 @@ StartLimitBurst=2
StartLimitIntervalSec=20 StartLimitIntervalSec=20
[Service] [Service]
ExecStart=/home/fulcrum/Fulcrum /home/fulcrum/.fulcrum/fulcrum.conf ExecStart=/home/fulcrum/Fulcrum --db-upgrade /home/fulcrum/.fulcrum/fulcrum.conf
KillSignal=SIGINT KillSignal=SIGINT
User=fulcrum User=fulcrum
LimitNOFILE=8192 LimitNOFILE=8192
@@ -502,6 +502,15 @@ if [ "$1" = update ]; then
sudo systemctl disable --now fulcrum sudo systemctl disable --now fulcrum
# Update config file: remove deprecatedutxo_cache and fast_sync entries
configFile="/home/fulcrum/.fulcrum/fulcrum.conf"
if [ -f "$configFile" ]; then
echo "# Updating Fulcrum config file"
# Remove utxo_cache and fast_sync entries
sudo -u fulcrum sed -i '/^utxo_cache/d' "$configFile"
sudo -u fulcrum sed -i '/^fast_sync/d' "$configFile"
fi
createSystemdService createSystemdService
sudo systemctl enable --now fulcrum sudo systemctl enable --now fulcrum