Improve chrome repo detection

This commit is contained in:
Luis Guzmán 2020-12-16 03:01:35 -06:00
parent 2e206649c9
commit 62436daec5
1 changed files with 2 additions and 1 deletions

View File

@ -53,6 +53,7 @@ DIR_RECORD="/var/jbrecord"
REC_DIR="/home/jibri/finalize_recording.sh"
CHD_VER="$(curl -sL https://chromedriver.storage.googleapis.com/LATEST_RELEASE)"
GOOGL_REPO="/etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list"
GOOGLE_ACTIVE_REPO=$(apt-cache policy | grep http | grep chrome| awk '{print $3}' | head -n 1 | cut -d "/" -f2)
GCMP_JSON="/etc/opt/chrome/policies/managed/managed_policies.json"
PUBLIC_IP="$(dig -4 @resolver1.opendns.com ANY myip.opendns.com +short)"
NJN_RAND_TAIL="$(tr -dc "a-zA-Z0-9" < /dev/urandom | fold -w 4 | head -n1)"
@ -240,7 +241,7 @@ apt-get -y install \
openjdk-8-jre-headless
echo "# Installing Google Chrome / ChromeDriver"
if [ -f $GOOGL_REPO ]; then
if [ "$GOOGLE_ACTIVE_REPO" = "main" ]; then
echo "Google repository already set."
else
echo "Installing Google Chrome Stable"