fix inital BTCPayServer install

This commit is contained in:
rootzoll
2020-07-24 00:42:56 +02:00
parent b0b17cc7bb
commit b8ed694bce

View File

@@ -367,19 +367,24 @@ WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl daemon-reload
# start to create settings.config # start to create settings.config
sudo systemctl enable nbxplorer sudo systemctl enable nbxplorer
#sudo systemctl start nbxplorer
#echo "Checking for nbxplorer config" if [ "${state}" == "ready" ]; then
#while [ ! -f "/home/btcpay/.nbxplorer/Main/settings.config" ] echo "Starting nbxplorer"
# do sudo systemctl start nbxplorer
# echo "Waiting for nbxplorer to start - CTRL+C to abort" echo "Checking for nbxplorer config"
# sleep 10 while [ ! -f "/home/btcpay/.nbxplorer/Main/settings.config" ]
# hasFailed=$(sudo systemctl status nbxplorer | grep -c "Active: failed") do
# if [ ${hasFailed} -eq 1 ]; then echo "Waiting for nbxplorer to start - CTRL+C to abort"
# echo "seems like starting nbxplorer service has failed - see: systemctl status nbxplorer" sleep 10
# echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214" hasFailed=$(sudo systemctl status nbxplorer | grep -c "Active: failed")
# fi if [ ${hasFailed} -eq 1 ]; then
#done echo "seems like starting nbxplorer service has failed - see: systemctl status nbxplorer"
echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
fi
done
else
echo "Because the system is not 'ready' the service 'nbxplorer' will not be started at this point .. its enabled and will start on next reboot"
fi
echo "" echo ""
echo "***" echo "***"
@@ -397,13 +402,9 @@ EOF
sudo mv /home/admin/settings.config /home/btcpay/.nbxplorer/Main/settings.config sudo mv /home/admin/settings.config /home/btcpay/.nbxplorer/Main/settings.config
sudo chown btcpay:btcpay /home/btcpay/.nbxplorer/Main/settings.config sudo chown btcpay:btcpay /home/btcpay/.nbxplorer/Main/settings.config
#sudo systemctl restart nbxplorer
if [ "${state}" == "ready" ]; then if [ "${state}" == "ready" ]; then
echo "Starting nbxplorer" sudo systemctl restart nbxplorer
sudo systemctl start nbxplorer
else
echo "Because the system is not 'ready' the service 'nbxplorer' will not be started at this point .. its enabled and will start on next reboot"
fi fi
# BTCPayServer # BTCPayServer
@@ -449,21 +450,21 @@ WantedBy=multi-user.target
if [ "${state}" == "ready" ]; then if [ "${state}" == "ready" ]; then
echo "Starting btcpayserver" echo "Starting btcpayserver"
sudo systemctl start btcpayserver sudo systemctl start btcpayserver
echo "Checking for btcpayserver config"
while [ ! -f "/home/btcpay/.btcpayserver/Main/settings.config" ]
do
echo "Waiting for btcpayserver to start - CTRL+C to abort"
sleep 10
hasFailed=$(sudo systemctl status btcpayserver | grep -c "Active: failed")
if [ ${hasFailed} -eq 1 ]; then
echo "seems like starting btcpayserver service has failed - see: systemctl status btcpayserver"
echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
fi
done
else else
echo "Because the system is not 'ready' the service 'btcpayserver' will not be started at this point .. its enabled and will start on next reboot" echo "Because the system is not 'ready' the service 'btcpayserver' will not be started at this point .. its enabled and will start on next reboot"
fi fi
#echo "Checking for btcpayserver config"
#while [ ! -f "/home/btcpay/.btcpayserver/Main/settings.config" ]
# do
# echo "Waiting for btcpayserver to start - CTRL+C to abort"
# sleep 10
# hasFailed=$(sudo systemctl status btcpayserver | grep -c "Active: failed")
# if [ ${hasFailed} -eq 1 ]; then
# echo "seems like starting btcpayserver service has failed - see: systemctl status btcpayserver"
# echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
# fi
#done
sudo -u btcpay mkdir -p /home/btcpay/.btcpayserver/Main/ sudo -u btcpay mkdir -p /home/btcpay/.btcpayserver/Main/
/home/admin/config.scripts/bonus.btcpayserver.sh write-tls-macaroon /home/admin/config.scripts/bonus.btcpayserver.sh write-tls-macaroon