-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsolution_status
More file actions
executable file
·46 lines (39 loc) · 1004 Bytes
/
solution_status
File metadata and controls
executable file
·46 lines (39 loc) · 1004 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
44
45
#!/bin/bash
usage() {
echo "usage: $(basename $0) --sd <solution definition file name> "
echo " where:"
exit 1;
}
while [ ! -z $2 ]; do
case "$1" in
--sd ) input=$2 ;;
* ) usage ;;
esac
shift
done
echo "input file="$input
if [ -z $input ]; then
usage
fi
SERVICE_HOME_DIR=services
install_service(){
service_name=$1
bd_ip=$3
bd_user=$4
server=root@$bd_ip
args="$bd_user $service_arg1 $service_arg2 $service_arg3 $solution_args"
echo "*** Service $service_name status: ***"
echo "Node IP="$bd_ip
ssh $server "echo $HOSTTYPE" < /dev/null
ssh $server "bash -s" < $SERVICE_HOME_DIR/$service_name/status.sh $service_name $args
}
while IFS=',' read -r f1 f2 f3 f4 f5 f6 f7
do
## Ignore lines start with "#"
case $f1 in
\#*) continue;;
"") continue;;
esac
echo "************************************** "
install_service $f1 "$f2" $f3 $f4 $f5 $f6 $f7
done < "$input"