-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcheck_pe_instance.sh
More file actions
35 lines (26 loc) · 813 Bytes
/
check_pe_instance.sh
File metadata and controls
35 lines (26 loc) · 813 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
#!/bin/bash
echo "+++++++++++++++++++++++++++ check_pe_image.sh ++++++++++++++++++++++++++++++++++++++++++++++++"
echo " "
echo " Starting check for given instances with provided flag restart or update"
echo " "
RE=false
UP=false
yes_string="yes"
if [ $1 = $yes_string ]; then
RE=true
elif [ $2 = $yes_string ]; then
UP=true
else
echo "No command found so exiting the process "
fi
if [ "$RE" = true ]; then
echo "received command is restart"
echo "Calling restart_pe_instance.sh"
$PE_ROOT/restart_pe_instance.sh >> $PE_ROOT/sh_execution_log
elif [ "$UP" = true ]; then
echo "received command is update"
echo "Calling update_pe_instance.sh"
"$PE_ROOT"/update_pe_instance.sh >> $PE_ROOT/sh_execution_log
else
echo "Command not received properly exiting the shell and aborting"
fi