Edit configuration stuff

This commit is contained in:
zontreck 2025-02-10 02:10:43 -07:00
parent e4317a8383
commit 0c79cf3e75

View file

@ -1,13 +1,22 @@
#!/bin/bash
echo "prune=$PRUNE" >> /btc.conf
echo "txindex=$TXINDEX" >> /btc.conf
echo "datadir=/data" >> /btc.conf
if [ $ENABLE_RPC == 1 ]
then
echo "server=1" >> /btc.conf
echo "rpcbind=0.0.0.0:8332" >> /btc.conf
if [ $ENABLE_AUTH == 1]
then
/app/bitcoind -datadir=/data -server=1 -txindex=$TXINDEX -prune=$PRUNE -rpcallowip=0.0.0.0 -rpcuser="$USER" -rpcpassword="$PASS" -rpcbind=0.0.0.0:8332
else
/app/bitcoind -datadir=/data -server=1 -txindex=$TXINDEX -prune=$PRUNE -rpcallowip=0.0.0.0 -rpcbind=0.0.0.0:8332
echo "rpcuser=$USER" >> /btc.conf
echo "rpcpassword=$PASS" >> /btc.conf
fi
else
/app/bitcoind -datadir=/data -txindex=$TXINDEX -prune=$PRUNE
fi
echo ": : : /!\\ CONFIG WRITTEN /!\\ : : :"
cat /btc.conf
echo ": : : /!\\ END CONFIG /!\\ : : :"
/app/bitcoind -conf=/btc.conf