more electrs info

This commit is contained in:
rootzoll 2019-12-18 13:07:55 +01:00
parent 8c7532cb1c
commit e2d2419bc2
2 changed files with 8 additions and 1 deletions

View File

@ -333,7 +333,7 @@ else
if [ "${ElectRS}" = "on" ]; then
source <(sudo /home/admin/config.scripts/bonus.electrs.sh status)
if [ "${isSynced}" = "0" ]; then
appInfoLine="Electrum Sync: ${infoSync}"
appInfoLine="${color_gray}Electrum Sync Info: ${infoSync}"
fi
fi

View File

@ -24,9 +24,15 @@ if [ "$1" = "status" ]; then
serviceInstalled=$(sudo systemctl status electrs --no-page 2>/dev/null | grep -c "electrs.service - Electrs")
echo "serviceInstalled=${serviceInstalled}"
if [ ${serviceInstalled} -eq 0 ]; then
echo "infoSync='Service not installed'"
fi
serviceRunning=$(sudo systemctl status electrs --no-page 2>/dev/null | grep -c "active (running)")
echo "serviceRunning=${serviceRunning}"
if [ ${serviceRunning} -eq 0 ]; then
echo "infoSync='Service not running - check: sudo journalctl -u electrs'"
fi
if [ ${serviceRunning} -eq 1 ]; then
# Experimental try to get sync Info
@ -319,6 +325,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
isInstalled=$(sudo ls /etc/systemd/system/electrs.service 2>/dev/null | grep -c 'electrs.service')
if [ ${isInstalled} -eq 1 ]; then
echo "*** REMOVING ELECTRS ***"
sudo systemctl stop electrs
sudo systemctl disable electrs