rename script tp cln.rest.sh

This commit is contained in:
openoms
2021-05-25 19:28:48 +01:00
parent 162f67d6b2
commit e34a04f38d
2 changed files with 9 additions and 5 deletions

View File

@@ -265,7 +265,7 @@ EOF
elif [ $LNTYPE = cln ];then
# clnrest
/home/admin/config.scripts/bonus.clnrest.sh on ${CHAIN}
/home/admin/config.scripts/cln.rest.sh on ${CHAIN}
echo "
# Systemd unit for ${netprefix}${typeprefix}RTL
@@ -377,7 +377,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
sudo systemctl disable ${netprefix}${typeprefix}RTL
sudo rm /etc/systemd/system/${netprefix}${typeprefix}RTL.service
if [ $LNTYPE = cln ];then
/home/admin/config.scripts/bonus.clnrest.sh off ${CHAIN}
/home/admin/config.scripts/cln.rest.sh off ${CHAIN}
fi
if [ "$(echo "$@" | grep -c purge)" -gt 0 ];then
echo "# Removing the binaries"

View File

@@ -1,5 +1,6 @@
#!/bin/bash
# https://github.com/Ride-The-Lightning/c-lightning-REST/releases/
CLRESTVERSION="v0.4.4"
# help
@@ -11,8 +12,8 @@ if [ $# -eq 0 ]||[ "$1" = "-h" ]||[ "$1" = "--help" ];then
echo "mainnet / signet / testnet instances cannot run parallel"
echo
echo "usage:"
echo "bonus.clnrest.sh on <signet|testnet>"
echo "bonus.clnrest.sh off"
echo "cln.rest.sh on <signet|testnet>"
echo "cln.rest.sh off"
echo
exit 1
fi
@@ -47,11 +48,14 @@ else
exit 1
fi
echo "# Running 'bonus.clnrest.sh $*'"
echo "# Running 'cln.rest.sh $*'"
if [ $1 = on ];then
echo "# Setting up c-lightning-REST for $NETWORK"
sudo systemctl stop clnrest
sudo systemctl disable clnrest
cd /home/bitcoin || exit 1
sudo -u bitcoin git clone https://github.com/saubyk/c-lightning-REST
cd c-lightning-REST || exit 1