From 8951a8a687e616f594628a342adcb78cbcf1bd6e Mon Sep 17 00:00:00 2001 From: Robert Cowham Date: Wed, 7 Jun 2023 18:23:39 +0100 Subject: [PATCH] Fix problem with DAM license file processing --- scripts/monitor_metrics.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/monitor_metrics.sh b/scripts/monitor_metrics.sh index 59668e7..24826d6 100755 --- a/scripts/monitor_metrics.sh +++ b/scripts/monitor_metrics.sh @@ -215,9 +215,9 @@ monitor_license () { if [[ $no_license -ne 1 ]]; then userCount=$(grep userCount $tmp_license_data | awk '{print $3}') userLimit=$(grep userLimit $tmp_license_data | awk '{print $3}') - licenseExpires=$(grep licenseExpires $tmp_license_data | awk '{print $3}') - licenseTimeRemaining=$(grep licenseTimeRemaining $tmp_license_data | awk '{print $3}') - supportExpires=$(grep supportExpires $tmp_license_data | awk '{print $3}') + licenseExpires=$(grep "\.\.\. licenseExpires" $tmp_license_data | awk '{print $3}') + licenseTimeRemaining=$(grep "\.\.\. licenseTimeRemaining" $tmp_license_data | awk '{print $3}') + supportExpires=$(grep "\.\.\. supportExpires" $tmp_license_data | awk '{print $3}') licenseInfo=$(grep "Server license: " "$tmp_info_data" | sed -e "s/Server license: //" | sed -Ee "s/\(expires [^\)]+\)//" | sed -Ee "s/\(support [^\)]+\)//" ) if [[ -z $licenseTimeRemaining && ! -z $supportExpires ]]; then dt=$(date +%s)