connect RTL with LIT or LOOP

This commit is contained in:
rootzoll 2021-09-01 09:39:55 +02:00
parent 41c7a61d3d
commit 55779a400a
3 changed files with 14 additions and 7 deletions

View File

@ -332,6 +332,9 @@ alias lit-frcli=\"frcli --rpcserver=localhost:8443 \
/home/admin/config.scripts/internet.hiddenservice.sh lit 443 8443
fi
# in case RTL is installed - check to connect
sudo /home/admin/config.scripts/bonus.rtl.sh connect-services
source /home/admin/raspiblitz.info
if [ "${state}" == "ready" ]; then
echo "# OK - the litd.service is enabled, system is ready so starting service"
@ -340,12 +343,6 @@ alias lit-frcli=\"frcli --rpcserver=localhost:8443 \
echo "# OK - the litd.service is enabled, to start manually use: 'sudo systemctl start litd'"
fi
# make Loop work with RTL if installed
# dont call anything that starts RTL service - otherwise update/recover might block
if [ ${#rtlWebinterface} -gt 0 ]&&[ ${rtlWebinterface} = on ];then
/home/admin/config.scripts/bonus.rtl.sh config
fi
exit 0
fi

View File

@ -136,6 +136,9 @@ WantedBy=multi-user.target
echo "# The Loop service already installed."
fi
# in case RTL is installed - check to connect
sudo /home/admin/config.scripts/bonus.rtl.sh connect-services
# setting value in raspi blitz config
sudo sed -i "s/^loop=.*/loop=on/g" /mnt/hdd/raspiblitz.conf

View File

@ -274,12 +274,19 @@ fi
if [ "$1" = "connect-services" ]; then
# has to run as use root or sudo
if [ "$USER" != "root" ] && [ "$USER" != "admin" ]; then
echo "# FAIL: run as user root or admin"
exit 1
fi
echo "## RTL CONNECT-SERVICES (when run as admin or root)"
# only run when RTL is installed
if [ -d /home/rtl ]; then
echo "## RTL CONNECT-SERVICES"
else
echo "# no RTL installed - no need to connect any services"
exit
fi
# LIT & LOOP Swap Server
echo "# checking of swap server ..."