From a6b334f41d8e1093f59c30c104fd03c20185f996 Mon Sep 17 00:00:00 2001 From: Andrea055 Date: Mon, 18 Oct 2021 23:05:41 +0200 Subject: [PATCH] add lines to fix a bug on ubuntu I try the script and give error "The repository 'https://repo.openmptcprouter.com buster Release' does not have a Release file." so i add lines to fix it --- debian9-x86_64.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index 27938fc..60f26d0 100755 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -61,7 +61,8 @@ VPSPATH="server-test" VPSURL="https://www.openmptcprouter.com/" REPO="repo.openmptcprouter.com" CHINA=${CHINA:-no} - +REQUIRED_PKG="ca-certificates" +PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed") OMR_VERSION="0.1026-test" DIR=$( pwd ) @@ -141,6 +142,12 @@ if [ "$UPDATE" = "yes" ]; then fi echo "Update mode" fi +#Checking for ca-certificates package +echo Checking for $REQUIRED_PKG: $PKG_OK +if [ "" = "$PKG_OK" ]; then + echo "No $REQUIRED_PKG. Setting up $REQUIRED_PKG." + sudo apt-get --yes install $REQUIRED_PKG +fi # Force update key [ -f /etc/apt/sources.list.d/openmptcprouter.list ] && { echo "Update OpenMPTCProuter repo key"