Timeout NM extras installation, if it takes too long
@@ -111,7 +111,7 @@ function config_nm {
rm -rf nomachine-common* && \
cp /usr/NX/etc/server.cfg /usr/NX/etc/server.cfg.template
if [[ $? -ne 0 ]]; then
- exit 1
+ return 1
fi
if [[ "$IS_RPM_BASED" = 0 ]]; then
@@ -131,9 +131,10 @@ function config_nm {
function install_nm_extras {
if [[ "$IS_RPM_BASED" = 0 ]]; then
- wget -q "https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm" -O /opt/google-chrome-stable_current_x86_64.rpm && \
- yum install -y /opt/google-chrome-stable_current_*.rpm && \
- rm -f /opt/google-chrome-stable_current_*.rpm
+ # Google chrome installation may be stuck, when updating. So just wait a bit and proceed further
+ wget -q "https://s3.amazonaws.com/cloud-pipeline-oss-builds/tools/chrome/google-chrome-${CP_NM_EXTRA_INSTALL_CHROME_VERSION:-104.0.5112.79-1}.rpm" -O /opt/google-chrome.rpm && \
+ timeout ${CP_NM_EXTRA_INSTALL_TIMEOUT:-1}m yum install -y /opt/google-chrome.rpm && \
+ rm -f /opt/google-chrome.rpm
else
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \
@@ -141,7 +142,7 @@ function install_nm_extras {
apt-get install --no-upgrade -y google-chrome-stable
fi
if [[ $? -ne 0 ]]; then
- exit 1
+ return 1
fi
mkdir -p /home/${OWNER}/Desktop/ && \
bash /tmp/create_chrome_launcher.sh && \
