forked from cybercongress/go-cyber
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathentrypoint.sh
50 lines (41 loc) · 1.05 KB
/
entrypoint.sh
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
49
50
#!/bin/sh
if [ ! -d "/root/.pussy/" ]
then
mkdir /root/.pussy/
mkdir /root/.pussy/config/
mkdir /root/.pussy/data/
/pussy/cosmovisor/genesis/bin/pussy init ${NODE_MONIKER}
cp -r /pussy/cosmovisor/ /root/.pussy
fi
if [ ! -f "/root/.pussy/config/node_key.json" ]
then
/pussy/cosmovisor/genesis/bin/pussy init ${NODE_MONIKER}
cp /genesis.json /root/.pussy/config/
cp -r /pussy/cosmovisor/ /root/.pussy
fi
if [ ! -d "/root/.pussy/cosmovisor" ]
then
cp -r /pussy/cosmovisor/ /root/.pussy/
fi
if [ ! -d "/root/.pussy/cosmovisor/updgrades" ]
then
cp -r /pussy/cosmovisor/upgrades /root/.pussy/cosmovisor/
fi
if [ ! -d "/root/.pussy/cosmovisor/updgrades/v0.0.3" ]
then
cp -r /pussy/cosmovisor/upgrades/v0.0.3 /root/.pussy/cosmovisor/upgrades
fi
if [ -f "/root/.pussy/cosmovisor/genesis/bin/pussy" ]
then
cp /pussy/cosmovisor/genesis/bin/pussy /root/.pussy/cosmovisor/genesis/bin/pussy
fi
if [ ! -f "/root/.pussy/config/genesis.json" ]
then
cp /genesis.json /root/.pussy/config/
fi
if [ "$2" = 'init' ]
then
return 0
else
exec "$@"
fi