Skip to content

Commit 8edeb3d

Browse files
fix typos
1 parent 26f6bba commit 8edeb3d

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

scripts/check_file_delivery.sh

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
################################################################################
44
# Name : check_file_delivery.sh #
55
# Author : Ibrahim Musayev #
6-
# Purpose : To avoid single point of failure on condition #
7-
# when control-M is down or maintained. #
8-
# Time based job is running in CTM at 6 pm to alert in addition on #
9-
# not started ETL run. #
6+
# Purpose : To avoid single point of failure on condition when BMC Control-M #
7+
# is down or maintained, time based job is running in CTM at given #
8+
# time period to alert if ETL run did not started. #
109
# History : 05.10.21 Ibrahim Musayev, creation #
1110
################################################################################
1211

@@ -19,16 +18,16 @@ LOGFILE=$HOME/masterdata_monitor.log
1918

2019

2120
if [[ ${hostname:1:1} == "p" && ${hostname:7:3} == "a01" ]]; then
22-
FILEPREFIX="PBSI4C"
21+
FILEPREFIX="P4C"
2322
FILENUMBER_MAX_MASTER=7
24-
FILENUMBER_MAX_CC=30
23+
FILENUMBER_MAX_COUNT=30
2524
elif [[ ${hostname:1:1} == "i" && ${hostname:7:3} == "a02" ]]; then
2625
FILENUMBER_MAX_MASTER=7
27-
FILENUMBER_MAX_CC=30
26+
FILENUMBER_MAX_COUNT=30
2827
elif [[ ${hostname:1:1} == "q" && ${hostname:7:3} == "a03" ]]; then
29-
FILEPREFIX="PBSI4C"
28+
FILEPREFIX="P4C"
3029
FILENUMBER_MAX_MASTER=7
31-
FILENUMBER_MAX_CC=30
30+
FILENUMBER_MAX_COUNT=30
3231
else
3332
echo "${TIMESTAMP} WARN: Script called in a wrong environment or server ${hostname}. Exiting!" | tee -a ${LOGFILE}
3433
exit 0
@@ -38,8 +37,7 @@ if [[ ! -d $(dirname ${LOGFILE}) ]]; then
3837
mkdir -p $(dirname ${LOGFILE})
3938
fi
4039

41-
cd /opt/bsi/transfer/_master_current
42-
FILECOUNT=`find . -type f -print | grep "${FILEPREFIX}.MASTERDATA.*${DATE}.zip" |wc -l 2>/dev/null`
40+
cd /opt/transfer/_master_current && FILECOUNT=`find . -type f -print | grep "${FILEPREFIX}.MASTERDATA.*${DATE}.zip" |wc -l 2>/dev/null`
4341

4442
if [[ ${FILECOUNT} -lt ${FILENUMBER_MAX_MASTER} ]]; then
4543
echo "${TIMESTAMP} ERROR: Masterdata files are not processed. Setting status NOT OK" | tee -a ${LOGFILE}
@@ -48,10 +46,9 @@ else
4846
echo "${TIMESTAMP} INFO: Masterdata files are successfully proceeded" | tee -a ${LOGFILE}
4947
fi
5048

51-
cd /opt/bsi/transfer/_cc_current
52-
FILECOUNT=`find . -type f -print | grep "${FILEPREFIX}.[M]*.*P${DATE}.*[0-9]" |wc -l 2>/dev/null`
49+
cd /opt/transfer/_etl_current && FILECOUNT=`find . -type f -print | grep "${FILEPREFIX}.[M]*.*P${DATE}.*[0-9]" |wc -l 2>/dev/null`
5350

54-
if [[ ${FILECOUNT} -lt ${FILENUMBER_MAX_CC} ]]; then
51+
if [[ ${FILECOUNT} -lt ${FILENUMBER_MAX_COUNT} ]]; then
5552
echo "${TIMESTAMP} ERROR: Masterdata files are not processed. Setting status NOT OK" | tee -a ${LOGFILE}
5653
EXITCODE=1
5754
else

0 commit comments

Comments
 (0)