-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker_entrypoint.sh
More file actions
executable file
·48 lines (37 loc) · 1.03 KB
/
docker_entrypoint.sh
File metadata and controls
executable file
·48 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -e
export HOST_IP=$(ip -4 route list match 0/0 | awk '{print $3}')
export RTL_CONFIG_PATH=/root
rm -rf /root/cl-external-* /root/lnd-external-*
echo start9/public > /root/.backupignore
echo start9/shared >> /root/.backupignore
result=$(yq '.nodes.[] | select(.connection-settings.type == "internal" and .type == "lnd")' /root/start9/config.yaml)
if [[ ! -z $result ]]
then
if ! test -d /mnt/lnd
then
echo "LND mountpoint does not exist"
exit 0
fi
while ! test -f /mnt/lnd/admin.macaroon
do
echo "Waiting for LND admin macaroon to be generated..."
sleep 30
done
fi
result=$(yq '.nodes.[] | select(.connection-settings.type == "internal" and .type == "c-lightning")' /root/start9/config.yaml)
if [[ ! -z $result ]]
then
if ! test -d /mnt/c-lightning
then
echo "Core Lightning mountpoint does not exist"
exit 0
fi
while ! test -f /mnt/c-lightning/clnrest_rune
do
echo "Waiting for clnrest_rune to be generated..."
sleep 30
done
fi
configurator
exec tini -g -- node rtl