Skip to content

Commit

Permalink
Changed the proxy setting properties with ext prefixed one
Browse files Browse the repository at this point in the history
  • Loading branch information
swathy-shaji committed Jan 10, 2025
1 parent 05f9a8d commit ad1ffe2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/bin/zmlicensectl
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ startLicenseDaemonService()
if [ "x$zimbra_license_daemon_offline_mode" = "x" ]; then
zimbra_license_daemon_offline_mode=false
fi
if [ "x$zimbra_license_proxy_timeout" = "x" ]; then
zimbra_license_proxy_timeout=60
if [ "x$EXT_LICENSE_PROXY_SERVICE_TIMEOUT" = "x" ]; then
EXT_LICENSE_PROXY_SERVICE_TIMEOUT=60
fi
# Converting the value to milliseconds by appending 3 zeros
zimbra_license_proxy_timeout="${zimbra_license_proxy_timeout}000"
echo "Value of timeout $EXT_LICENSE_PROXY_SERVICE_TIMEOUT"
EXT_LICENSE_PROXY_SERVICE_TIMEOUT="${EXT_LICENSE_PROXY_SERVICE_TIMEOUT}000"
if [ -f ${LD_LIBRARY_PATH}/libShafer-prod-linux64.so ]; then
export LD_LIBRARY_PATH; nohup ${ZMJAVA} -Dlicense-daemon.log.level=${zimbra_license_daemon_log_level} -Dlicense-daemon.offline.mode=${zimbra_license_daemon_offline_mode} -Dlicense.proxy.api.http.timeout=${zimbra_license_proxy_timeout} -Dlicense.proxy.api.http.socketTimeout=${zimbra_license_proxy_timeout} -Dlicense.proxy.api.http.readTimeout=${zimbra_license_proxy_timeout} -jar $LICENSE_DAEMON_SERVICE --spring.profiles.active=prod --server.port=$LICENSE_DAEMON_SERVICE_PORT > /dev/null 2>&1 &
export LD_LIBRARY_PATH; nohup ${ZMJAVA} -Dlicense-daemon.log.level=${zimbra_license_daemon_log_level} -Dlicense-daemon.offline.mode=${zimbra_license_daemon_offline_mode} -Dext.license.proxy.service.timeout=${EXT_LICENSE_PROXY_SERVICE_TIMEOUT} -Dext.license.proxy.service.socketTimeout=${EXT_LICENSE_PROXY_SERVICE_TIMEOUT} -Dext.license.proxy.service.readTimeout=${EXT_LICENSE_PROXY_SERVICE_TIMEOUT} -jar $LICENSE_DAEMON_SERVICE --spring.profiles.active=prod --server.port=$LICENSE_DAEMON_SERVICE_PORT > /dev/null 2>&1 &
else
export LD_LIBRARY_PATH; nohup ${ZMJAVA} -Dlicense-daemon.log.level=${zimbra_license_daemon_log_level} -Dlicense-daemon.offline.mode=${zimbra_license_daemon_offline_mode} -Dlicense.proxy.api.http.timeout=${zimbra_license_proxy_timeout} -Dlicense.proxy.api.http.socketTimeout=${zimbra_license_proxy_timeout} -Dlicense.proxy.api.http.readTimeout=${zimbra_license_proxy_timeout} -jar $LICENSE_DAEMON_SERVICE --spring.profiles.active=dev --server.port=$LICENSE_DAEMON_SERVICE_PORT > /dev/null 2>&1 &
export LD_LIBRARY_PATH; nohup ${ZMJAVA} -Dlicense-daemon.log.level=${zimbra_license_daemon_log_level} -Dlicense-daemon.offline.mode=${zimbra_license_daemon_offline_mode} -Dext.license.proxy.service.timeout=${EXT_LICENSE_PROXY_SERVICE_TIMEOUT} -Dext.license.proxy.service.socketTimeout=${EXT_LICENSE_PROXY_SERVICE_TIMEOUT} -Dext.license.proxy.service.readTimeout=${EXT_LICENSE_PROXY_SERVICE_TIMEOUT} -jar $LICENSE_DAEMON_SERVICE --spring.profiles.active=dev --server.port=$LICENSE_DAEMON_SERVICE_PORT > /dev/null 2>&1 &
fi
sleep 5
checkLicenseDaemonServiceRunning
Expand Down Expand Up @@ -397,7 +398,7 @@ case "$1" in
exit 1
fi
# Read the current log level from CONFIG_FILE
proxyTimeout=$(grep "zimbra_license_proxy_timeout" "$CONFIG_FILE" | cut -d '=' -f 2)
proxyTimeout=$(grep "EXT_LICENSE_PROXY_SERVICE_TIMEOUT" "$CONFIG_FILE" | cut -d '=' -f 2)
# Output the current log level
echo "Current proxy timeout: $proxyTimeout seconds"
exit 0
Expand Down Expand Up @@ -440,7 +441,7 @@ case "$1" in
exit 1
fi
# Update the configuration file
sed -i "/zimbra_license_proxy_timeout*/c\zimbra_license_proxy_timeout="$proxyTimeout"" $CONFIG_FILE
sed -i "/EXT_LICENSE_PROXY_SERVICE_TIMEOUT*/c\EXT_LICENSE_PROXY_SERVICE_TIMEOUT="$proxyTimeout"" $CONFIG_FILE
# Check if the sed command succeeded
if [ $? != 0 ]; then
exit 1
Expand Down

0 comments on commit ad1ffe2

Please sign in to comment.