-
Notifications
You must be signed in to change notification settings - Fork 29
/
run.sh
executable file
·41 lines (36 loc) · 907 Bytes
/
run.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
#!/bin/sh
# Path: run.sh
. ./.env
optIn() {
docker run --env-file .env \
--rm \
--volume "${ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
${MAIN_SERVICE_IMAGE} \
opt-in-avs
}
optOut() {
docker run --env-file .env \
--rm \
--volume "${ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
${MAIN_SERVICE_IMAGE} \
opt-out-avs
}
status() {
docker run --env-file .env \
--rm \
--volume "${ECDSA_KEY_FILE_HOST}":/app/operator_keys/ecdsa_key.json \
--volume "${BLS_KEY_FILE_HOST}":/app/operator_keys/bls_key.json \
${MAIN_SERVICE_IMAGE} \
print-status
}
if [ "$1" = "opt-in" ]; then
optIn
elif [ "$1" = "opt-out" ]; then
optOut
elif [ "$1" = "status" ]; then
status
else
echo "Invalid command"
fi