From cfea51f40f3573098cf727a09825fa950d6b2f59 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 29 Oct 2021 17:45:37 +0200 Subject: [PATCH] [mod] utils/morty.sh - check golang version is go1.17.2 Related-to: 5c4afdd7 https://github.com/searxng/searxng/issues/455 Signed-off-by: Markus Heiser --- utils/morty.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/utils/morty.sh b/utils/morty.sh index 3d2d8c462..60220df02 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -283,6 +283,18 @@ install_check() { warn_msg "Check if public name is correct and routed or use the public IP from above." fi fi + + if [[ "${GO_VERSION}" > "$(go_version)" ]]; then + warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least" + else + info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)" + fi +} + +go_version(){ + sudo -i -u "$SERVICE_USER" <