Skip to content

Commit

Permalink
Fix enable_license and webadmin timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
djoven89 committed May 9, 2024
1 parent cf5c9c1 commit da6fcd4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions main/core/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
8.0.3
+ Fix auth.conf in enable_license script
+ Avoid Webadmin timeout when zentyal.com is down or collapsed
8.0.2
+ Fix configuration backup dependency. Fix #2160
+ Fix CPU load on Widget. Fix #2154
Expand Down
6 changes: 6 additions & 0 deletions main/core/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
zentyal-core (8.0.3) jammy; urgency=high

* New upstream release

-- Daniel Joven <djoven@novadevs.com> Tue, 07 May 2024 16:12:37 +0100

zentyal-core (8.0.2) jammy; urgency=high

* New upstream release
Expand Down
4 changes: 2 additions & 2 deletions main/core/src/EBox/Dashboard/CGI/Index.pm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ sub _getNewVersionFromCloud

my $version = EBox::Config::version();
my $newVersionString;
system("wget --quiet -O /tmp/new-release - http://update.zentyal.org/update-from-'$version'.txt");
system("timeout 15 wget --timeout 15 --quiet -O /tmp/new-release - http://update.zentyal.org/update-from-'$version'.txt");
try {
$newVersionString = $self->_readVersion();
} catch($ex) {
Expand All @@ -279,7 +279,7 @@ sub _getNewVersionFromCloud

if ($newVersionString eq "") {
$newVersionString = $version;
}
}

return $newVersionString;
}
Expand Down
4 changes: 3 additions & 1 deletion main/core/src/scripts/enable_license
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CURMAJORV=`dpkg -l|grep zentyal-core | awk '{print $3}' | cut -d'.' -f1`
CURMINORV=`dpkg -l|grep zentyal-core | awk '{print $3}' | cut -d'.' -f2`
CURV="${CURMAJORV}.${CURMINORV}"
KEYURL="keys.zentyal.org/zentyal-${CURV}-packages-com.asc"
APT_AUTH_CONF='/etc/apt/auth.conf.d/zentyal-commercial.conf'

# Preparing files to persist the response data
LK_CODE_FILE="/var/lib/zentyal/.license"
Expand Down Expand Up @@ -104,7 +105,8 @@ if [ $REQUEST -eq "200" ]; then
# Save the license key code
LK_CODE=$(echo $LK_DATA | jq -r ".code")
echo $LK_CODE > $LK_CODE_FILE
echo "machine packages.zentyal.com login $LK_CODE password $SERVER_HASH" > /etc/apt/auth.conf
echo "machine https://packages.zentyal.com login $LK_CODE password $SERVER_HASH" > $APT_AUTH_CONF
chmod 600 $APT_AUTH_CONF

touch /var/lib/zentyal/.commercial-edition
logger UCP[$$] INFO: License key $LK_CODE was enabled.
Expand Down

0 comments on commit da6fcd4

Please sign in to comment.