fix bitcoin aliases, whitespaces and comments (#3483)

* fix bitcoin aliases, whitespaces and comments

* fix typo
This commit is contained in:
openoms 2022-12-07 19:39:28 +00:00 committed by GitHub
parent c69b2603de
commit 41e75d9d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 34 deletions

View File

@ -335,7 +335,7 @@ do
fi
####################################################
# CHECK FOR End of Intial Blockhain & Lightning Sync
# Check for end of Initial Blockhain & Lightning Sync
# bitcoin mainnet only / special on dbcache size
####################################################
@ -621,7 +621,7 @@ do
###############################
# SUBSCRIPTION RENWES
# SUBSCRIPTION RENEWS
###############################
# check every 20min

View File

@ -309,14 +309,14 @@ WantedBy=multi-user.target
sudo -u admin touch /home/admin/_aliases
if [ "$(alias | grep -c "alias ${prefix}bitcoin-cli")" -eq 0 ];then
echo "\
alias ${prefix}bitcoin-cli=\"/usr/local/bin/bitcoin-cli\
alias ${prefix}bitcoin-cli=\"sudo -u bitcoin /usr/local/bin/bitcoin-cli\
-rpcport=${rpcprefix}8332\"
alias ${prefix}bitcoind=\"/usr/local/bin/bitcoind -${CHAIN}\"\
alias ${prefix}bitcoind=\"sudo -u bitcoin /usr/local/bin/bitcoind -${CHAIN}\"\
" | sudo tee -a /home/admin/_aliases
fi
if [ "$(alias | grep -c "alias ${prefix}bitcoinlog")" -eq 0 ];then
echo "\
alias ${prefix}bitcoinlog=\"sudo tail -n 30 -f ${bitcoinlogpath}\"\
alias ${prefix}bitcoinlog=\"sudo -u bitcoin tail -n 30 -f ${bitcoinlogpath}\"\
" | sudo tee -a /home/admin/_aliases
fi
sudo chown admin:admin /home/admin/_aliases
@ -332,7 +332,7 @@ alias ${prefix}bitcoinlog=\"sudo tail -n 30 -f ${bitcoinlogpath}\"\
fi
isInstalled=$(systemctl status ${prefix}bitcoind | grep -c active)
if [ $isInstalled -gt 0 ];then
if [ $isInstalled -gt 0 ]; then
echo "# Installed $(bitcoind --version | grep version)"
echo
echo "# Monitor the ${prefix}bitcoind with:"

View File

@ -58,7 +58,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
rm -f node-$VERSION-$DISTRO.tar.xz*
exit 1
fi
echo "OK the checkdum of nodeJS is OK"
echo "OK the checksum of nodeJS is OK"
sleep 3
# install
sudo mkdir -p /usr/local/lib/nodejs

View File

@ -59,19 +59,16 @@ if [ "$1" = getvars ];then
# zmqprefix is: 28 | 21 | 23
if [ "${chain}" == "main" ];then
netprefix=""
L1rpcportmod=""
L2rpcportmod=0
portprefix=""
zmqprefix=28
elif [ "${chain}" == "test" ];then
netprefix="t"
L1rpcportmod=1
L2rpcportmod=1
portprefix=1
zmqprefix=21
elif [ "${chain}" == "sig" ];then
netprefix="s"
L1rpcportmod=3
L2rpcportmod=3
portprefix=3
zmqprefix=23
@ -114,7 +111,7 @@ if [ "$1" = getvars ];then
# sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net
echo "lncli_alias=\"sudo -u bitcoin /usr/local/bin/lncli -n=${chain}net --rpcserver localhost:1${L2rpcportmod}009\""
# sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network}
echo "bitcoincli_alias=\"/usr/local/bin/${network}-cli -datadir=/home/bitcoin/.${network} -rpcport=${L1rpcportmod}8332\""
echo "bitcoincli_alias=\"/usr/local/bin/${network}-cli -datadir=/home/bitcoin/.${network} -rpcport=${portprefix}8332\""
fi