@@ -13,11 +13,11 @@
|
||||
"lnNode": "Core Lightning Testnet # 1",
|
||||
"lnImplementation": "CLN",
|
||||
"Authentication": {
|
||||
"runePath": "/RTL/.lightning/bitcoin"
|
||||
"runePath": "/RTL/data/rtl.macaroon"
|
||||
},
|
||||
"Settings": {
|
||||
"userPersona": "OPERATOR",
|
||||
"themeMode": "DAY",
|
||||
"themeMode": "NIGHT",
|
||||
"themeColor": "PURPLE",
|
||||
"bitcoindConfigPath": "",
|
||||
"logLevel": "INFO",
|
||||
@@ -27,5 +27,6 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"multiPass": "n0xb0x"
|
||||
"multiPass": "{{rtl_password}}"
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
RUNEFILE=~/vol/rtl/data/rtl.macaroon
|
||||
running=$(podman ps --filter "name=systemd-clightning-node" --format json | jq -r .[].State)
|
||||
|
||||
|
||||
if [ -e $RUNEFILE ];
|
||||
then
|
||||
echo "Macaroon $RUNEFILE already exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ "$running" == "running" ]
|
||||
then
|
||||
# Its running
|
||||
checkrune=$(podman exec -it systemd-clightning-node lightning-cli showrunes | jq -r .runes[0].unique_id)
|
||||
if [ "$checkrune" -eq 0 ];
|
||||
then
|
||||
# Rune exist, get it and output to $RUNEFILE
|
||||
rune=$(podman exec -it systemd-clightning-node lightning-cli showrunes | jq -r .runes[0].rune)
|
||||
else
|
||||
# Rune doesn't exist, create it and output to $RUNEFILE
|
||||
rune=$(podman exec -it systemd-clightning-node lightning-cli createrune | jq -r .runes[0].rune)
|
||||
fi
|
||||
echo "LIGHTNING_RUNE=\"$rune\"" > $RUNEFILE
|
||||
exit 0
|
||||
else
|
||||
echo "Can't find systemd-clightning-node running."
|
||||
# exit 1
|
||||
fi
|
||||
@@ -8,7 +8,6 @@ PodmanArgs=--pod bitcoin-pod
|
||||
# Use volume
|
||||
Volume=/home/{{ansible_user}}/vol/rtl/data:/RTL/data:Z
|
||||
Volume=/home/{{ansible_user}}/vol/rtl/RTL-Config.json:/RTL/RTL-Config.json:Z
|
||||
Volume=/home/{{ansible_user}}/vol/clightning:/RTL/:ro,Z
|
||||
|
||||
[Service]
|
||||
# Restart service when sleep finishes
|
||||
|
||||
Reference in New Issue
Block a user