-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_StorX_node_statuses.sh
39 lines (31 loc) · 1.15 KB
/
check_StorX_node_statuses.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
#!/bin/bash
# Set filename to obtain IP address list for StorX Node VPS's to setup wth SSH-key authentication
FILE="ip_addresses"
# Set Colour Vars
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo
echo
echo -e "${GREEN} #################################################### ${NC}"
echo -e "${GREEN} # # ${NC}"
echo -e "${GREEN} # NODE STATUS CHECKER # ${NC}"
echo -e "${GREEN} # FOR MULTIPLE STORX NODES # ${NC}"
echo -e "${GREEN} # # ${NC}"
echo -e "${GREEN} # Created by s4njk4n - https://github.com/s4njk4n/ # ${NC}"
echo -e "${GREEN} # # ${NC}"
echo -e "${GREEN} #################################################### ${NC}"
echo
echo
while IFS= read line
do
echo
echo
echo -e "${GREEN}Retrieving Status of StorX Node - $line ${NC}"
echo
ssh -n -p 22 root@$line 'sudo docker exec storx-node_storxnetwork_1 xcore status'
done < "$FILE"
echo
echo
echo -e "${RED}STORX NODE STATUS RETRIEVAL COMPLETE ${NC}"
echo