forked from cyberia-to/go-cyber
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathentrypoint.sh
More file actions
43 lines (36 loc) · 1012 Bytes
/
entrypoint.sh
File metadata and controls
43 lines (36 loc) · 1012 Bytes
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
#!/bin/sh
if [ ! -d "/root/.deepchain/" ]
then
mkdir /root/.deepchain/
mkdir /root/.deepchain/config/
/deepchain/cosmovisor/genesis/bin/deepchain init ${NODE_MONIKER}
cp -r /deepchain/cosmovisor/ /root/.deepchain
fi
if [ ! -f "/root/.deepchain/config/node_key.json" ]
then
/deepchain/cosmovisor/genesis/bin/deepchain init ${NODE_MONIKER}
cp /genesis.json /root/.deepchain/config/
cp -r /deepchain/cosmovisor/ /root/.deepchain
fi
if [ ! -d "/root/.deepchain/cosmovisor" ]
then
cp -r /deepchain/cosmovisor/ /root/.deepchain/
fi
if [ ! -d "/root/.deepchain/cosmovisor/updgrades" ]
then
cp -r /deepchain/cosmovisor/upgrades /root/.deepchain/cosmovisor/
fi
if [ -f "/root/.deepchain/cosmovisor/genesis/bin/deepchain" ]
then
cp /deepchain/cosmovisor/genesis/bin/deepchain /root/.deepchain/cosmovisor/genesis/bin/deepchain
fi
if [ ! -f "/root/.deepchain/config/genesis.json" ]
then
cp /genesis.json /root/.deepchain/config/
fi
if [ "$2" = 'init' ]
then
return 0
else
exec "$@"
fi