2
2
3
3
# The script collects Central Licenses debug files for troubleshooting purposes.
4
4
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.
11
11
# For additional information please refer to CloudGuard Network Central License Tool Administration Guide.
12
12
13
13
14
- # Licenses_Collector - version 4
14
+ # Licenses_Collector - version 5
15
15
16
16
usage ()
17
17
{
@@ -22,21 +22,21 @@ usage()
22
22
}
23
23
24
24
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 "
28
28
;;
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
40
40
done
41
41
42
42
@@ -48,7 +48,7 @@ USERCENTER=https://usercenter.CheckPoint.com
48
48
49
49
log_msg ()
50
50
{
51
- echo " $( date) $1 "
51
+ echo " $( date) $1 "
52
52
}
53
53
54
54
log_msg " Starting"
63
63
64
64
# checking if there's connectivity with userCenter and if TCP port 18208 is open
65
65
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
67
67
netstat -na | grep " 18208" >> $TMPPATH /Sync
68
68
printf " \n\n" >> $TMPPATH /Sync
69
69
70
70
71
- printf " Checking connecitivty with userCenter\n\n" >> $TMPPATH /Sync
71
+ printf " Checking connecitivty with userCenter\n\n" >> $TMPPATH /Sync
72
72
73
73
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
76
76
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
79
79
fi
80
-
80
+
81
81
printf " the exit code is : %s\n" $? >> $TMPPATH /Sync
82
82
83
83
# Collect server logs (cpm.elg*) data
84
84
log_msg " Copying $MDS_FWDIR /log/cpm.elg* into $TMPPATH "
85
85
cp $MDS_FWDIR /log/cpm.elg* $TMPPATH
86
86
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
+
87
92
# Collect client logs (vseclic.elg*) data
88
93
log_msg " Copying $MDS_FWDIR /log/vseclic.elg* into $TMPPATH "
89
94
cp $MDS_FWDIR /log/vseclic.elg* $TMPPATH
0 commit comments