diff --git a/tools/test-jibri-env.sh b/tools/test-jibri-env.sh index 0262c71..6a54700 100644 --- a/tools/test-jibri-env.sh +++ b/tools/test-jibri-env.sh @@ -56,23 +56,16 @@ else exit fi -echo -e "\nAttempting (any possible) jibri upgrade!" +if [ "$(apt-show-versions jibri | grep -c "uptodate")" = "1" ]; then +echo -e "Jibri is already up to date: \xE2\x9C\x94" +else +echo -e "\nAttempting jibri upgrade!" apt -y install --only-upgrade jibri +fi echo -e "\n# -- Test kernel modules --\n" if [ -z $SND_AL_MODULE ]; then - echo -e "No module snd_aloop detected. <== IMPORTANT! \nCurrent kernel: $(uname -r)" - echo -e "\nIf you just installed a new kernel, \ -please try rebooting.\nFor now wait 'til the end of the recommended kernel installation." - echo "# Check and Install HWE kernel if possible..." - if uname -r | grep -q aws;then - KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|head -n1|awk '{print$3}'|cut -d "." -f1-4)" - KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | grep generic | grep -v recovery | awk '{print$3,$4}'|grep $KNL_HWE)" - if [ ! -z "$KNL_MENU" ];then - echo -e "\nSeems you are using an AWS kernel <== IMPORTANT! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \ - echo "$KNL_MENU" - fi - fi +#First make sure the recommended kernel is installed. if [ "$HWE_VIR_MOD" == "1" ]; then apt-get -y install \ linux-image-generic-hwe-$(lsb_release -sr) \ @@ -81,6 +74,18 @@ please try rebooting.\nFor now wait 'til the end of the recommended kernel insta apt-get -y install \ linux-modules-extra-$(uname -r) fi + echo -e "No module snd_aloop detected. \xE2\x9C\x96 <== IMPORTANT! \nCurrent kernel: $(uname -r)" + echo -e "\nIf you just installed a new kernel, \ +please try rebooting.\nFor now wait 'til the end of the recommended kernel installation." + echo "# Check and Install HWE kernel if possible..." + if uname -r | grep -q aws;then + KNL_HWE="$(apt-cache madison linux-image-generic-hwe-$(lsb_release -sr)|head -n1|awk '{print$3}'|cut -d "." -f1-4)" + KNL_MENU="$(awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg | grep generic | grep -v recovery | awk '{print$3,$4}'|grep $KNL_HWE)" + if [ ! -z "$KNL_MENU" ];then + echo -e "\nSeems you are using an AWS kernel \xE2\x9C\x96 <== IMPORTANT! \nYou might consider modify your grub (/etc/default/grub) to use the following:" && \ + echo -e "\n > $KNL_MENU" + fi + fi else echo -e "Great!\nModule snd-aloop found!" fi