-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_Plugin_node_statuses.sh
More file actions
39 lines (31 loc) · 1.1 KB
/
check_Plugin_node_statuses.sh
File metadata and controls
39 lines (31 loc) · 1.1 KB
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 Plugin Node VPS's to setup wth SSH-key authentication
FILE="user_at_ip"
# 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 PLUGIN 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 Plugin Node - $line ${NC}"
echo
ssh -n $line 'pm2 status'
done < "$FILE"
echo
echo
echo -e "${RED}PLUGIN NODE STATUS RETRIEVAL COMPLETE ${NC}"
echo