File tree Expand file tree Collapse file tree 7 files changed +174
-259
lines changed Expand file tree Collapse file tree 7 files changed +174
-259
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ if [ " $DEBUG " = " 1" ]; then
6
+ set -x
7
+ fi
8
+
9
+ if [ " $ALGORAND_DATA " != " /algod/data" ]; then
10
+ echo " Do not override 'ALGORAND_DATA' environment variable."
11
+ exit 1
12
+ fi
13
+ # To allow mounting the data directory we need to change permissions
14
+ # to our algorand user. The script is initially run as the root user
15
+ # in order to change permissions, afterwards the script is re-launched
16
+ # as the algorand user.
17
+ if [ " $( id -u) " = ' 0' ]; then
18
+ chown -R algorand:algorand $ALGORAND_DATA
19
+ exec su -p -c " $( readlink -f $0 ) $@ " algorand
20
+ fi
21
+
22
+ /node/run/start_empty.sh &
23
+ /node/run/start_fast_catchup.sh &
24
+ /node/run/start_dev.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ if [ " $DEBUG " = " 1" ]; then
6
+ set -x
7
+ fi
8
+
9
+ if [ " $ALGORAND_DATA " != " /algod/data" ]; then
10
+ echo " Do not override 'ALGORAND_DATA' environment variable."
11
+ exit 1
12
+ fi
13
+
14
+ # To allow mounting the data directory we need to change permissions
15
+ # to our algorand user. The script is initially run as the root user
16
+ # in order to change permissions, afterwards the script is re-launched
17
+ # as the algorand user.
18
+ if [ " $( id -u) " = ' 0' ]; then
19
+ chown -R algorand:algorand " $ALGORAND_DATA "
20
+ exec su -p -c " $( readlink -f $0 ) $@ " algorand
21
+ fi
22
+
23
+
24
+ # Configure the participation node
25
+ if [ -d " $ALGORAND_DATA " ]; then
26
+ if [ " $TOKEN " != " " ]; then
27
+ echo " $TOKEN " > " $ALGORAND_DATA /algod.token"
28
+ fi
29
+ if [ " $ADMIN_TOKEN " != " " ]; then
30
+ echo " $ADMIN_TOKEN " > " $ALGORAND_DATA /algod.admin.token"
31
+ fi
32
+ cd " $ALGORAND_DATA "
33
+ cp " /node/run/genesis/testnet/genesis.json" genesis.json
34
+ algocfg profile set --yes -d " $ALGORAND_DATA " " participation"
35
+ algod -o -d $ALGORAND_DATA -l " 0.0.0.0:8080"
36
+ else
37
+ echo " $ALGORAND_DATA " does not exist
38
+ exit 1
39
+ fi
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ if [ " $DEBUG " = " 1" ]; then
6
+ set -x
7
+ fi
8
+
9
+ if [ " $ALGORAND_DATA " != " /algod/data" ]; then
10
+ echo " Do not override 'ALGORAND_DATA' environment variable."
11
+ exit 1
12
+ fi
13
+
14
+ EMPTY_DATA=/algod/empty
15
+
16
+ # To allow mounting the data directory we need to change permissions
17
+ # to our algorand user. The script is initially run as the root user
18
+ # in order to change permissions, afterwards the script is re-launched
19
+ # as the algorand user.
20
+ if [ " $( id -u) " = ' 0' ]; then
21
+ chown -R algorand:algorand $EMPTY_DATA
22
+ exec su -p -c " $( readlink -f $0 ) $@ " algorand
23
+ fi
24
+
25
+
26
+ # Configure the participation node
27
+ if [ -d " $EMPTY_DATA " ]; then
28
+ if [ " $TOKEN " != " " ]; then
29
+ echo " $TOKEN " > " $EMPTY_DATA /algod.token"
30
+ fi
31
+ if [ " $ADMIN_TOKEN " != " " ]; then
32
+ echo " $ADMIN_TOKEN " > " $EMPTY_DATA /algod.admin.token"
33
+ fi
34
+ cd $EMPTY_DATA
35
+ cp " /node/run/genesis/testnet/genesis.json" genesis.json
36
+ algocfg profile set --yes -d " $EMPTY_DATA " " participation"
37
+ algod -o -d $EMPTY_DATA -l " 0.0.0.0:8082"
38
+ else
39
+ echo $EMPTY_DATA does not exist
40
+ exit 1
41
+ fi
You can’t perform that action at this time.
0 commit comments