Skip to content

Commit 8d9c2a4

Browse files
authored
Merge pull request #364 from chkp-yazanb/master
Update Central license script collector - Added alignLicenses.elg file
2 parents 06b8aa5 + d40a0d9 commit 8d9c2a4

File tree

1 file changed

+34
-29
lines changed

1 file changed

+34
-29
lines changed

common/central_license_debug_collector.sh

+34-29
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
# The script collects Central Licenses debug files for troubleshooting purposes.
44

5-
# Instructions :
6-
# If you have MDS environment and uses license in domain mode - please run the script with -d <DOMAIN_NAME>
7-
# If your environment acceseses the internet using a configured proxy - please run the script with -p <IP_or_HostName:Port>
8-
# Otherwise , run the script directly .
9-
10-
# Written by: Check Point Software Technologies LTD.
5+
# Instructions :
6+
# If you have MDS environment and uses license in domain mode - please run the script with -d <DOMAIN_NAME>
7+
# If your environment acceseses the internet using a configured proxy - please run the script with -p <IP_or_HostName:Port>
8+
# Otherwise , run the script directly .
9+
10+
# Written by: Check Point Software Technologies LTD.
1111
# For additional information please refer to CloudGuard Network Central License Tool Administration Guide.
1212

1313

14-
# Licenses_Collector - version 4
14+
# Licenses_Collector - version 5
1515

1616
usage()
1717
{
@@ -22,21 +22,21 @@ usage()
2222
}
2323

2424
while getopts "p:d:h" opt; do
25-
case "$opt" in
26-
d)
27-
DOMAIN_NAME="$OPTARG"
25+
case "$opt" in
26+
d)
27+
DOMAIN_NAME="$OPTARG"
2828
;;
29-
p)
30-
PROXY_PORT="$OPTARG"
31-
;;
32-
h)
33-
usage
34-
exit 0
35-
;;
36-
*)
37-
usage
38-
exit 1
39-
esac
29+
p)
30+
PROXY_PORT="$OPTARG"
31+
;;
32+
h)
33+
usage
34+
exit 0
35+
;;
36+
*)
37+
usage
38+
exit 1
39+
esac
4040
done
4141

4242

@@ -48,7 +48,7 @@ USERCENTER=https://usercenter.CheckPoint.com
4848

4949
log_msg()
5050
{
51-
echo "$(date) $1"
51+
echo "$(date) $1"
5252
}
5353

5454
log_msg "Starting"
@@ -63,27 +63,32 @@ fi
6363

6464
# checking if there's connectivity with userCenter and if TCP port 18208 is open
6565
log_msg " Checking if TCP port 18208 is open and accessible"
66-
printf " Checking TCP port \n\n" >> $TMPPATH/Sync
66+
printf " Checking TCP port \n\n" >> $TMPPATH/Sync
6767
netstat -na | grep "18208" >> $TMPPATH/Sync
6868
printf "\n\n" >> $TMPPATH/Sync
6969

7070

71-
printf " Checking connecitivty with userCenter\n\n" >> $TMPPATH/Sync
71+
printf " Checking connecitivty with userCenter\n\n" >> $TMPPATH/Sync
7272

7373
if [ -n "$PROXY_PORT" ]; then
74-
log_msg " Checking connecitivty with userCenter using proxy"
75-
$CURL_CLI --proxy $PROXY_PORT -v -k $USERCENTER &>> $TMPPATH/Sync
74+
log_msg " Checking connecitivty with userCenter using proxy"
75+
$CURL_CLI --proxy $PROXY_PORT -v -k $USERCENTER &>> $TMPPATH/Sync
7676
else
77-
log_msg " Checking connecitivty with userCenter without using proxy"
78-
$CURL_CLI -v -k $USERCENTER &>> $TMPPATH/Sync
77+
log_msg " Checking connecitivty with userCenter without using proxy"
78+
$CURL_CLI -v -k $USERCENTER &>> $TMPPATH/Sync
7979
fi
80-
80+
8181
printf "the exit code is : %s\n" $? >> $TMPPATH/Sync
8282

8383
# Collect server logs (cpm.elg*) data
8484
log_msg " Copying $MDS_FWDIR/log/cpm.elg* into $TMPPATH"
8585
cp $MDS_FWDIR/log/cpm.elg* $TMPPATH
8686

87+
if [ -f "$MDS_FWDIR/log/alignLicensesInDB.elg" ]; then
88+
log_msg " Copying $MDS_FWDIR/log/alignLicensesInDB.elg into $TMPPATH"
89+
cp $MDS_FWDIR/log/alignLicensesInDB.elg $TMPPATH
90+
fi
91+
8792
#Collect client logs (vseclic.elg*) data
8893
log_msg " Copying $MDS_FWDIR/log/vseclic.elg* into $TMPPATH"
8994
cp $MDS_FWDIR/log/vseclic.elg* $TMPPATH

0 commit comments

Comments
 (0)