summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-10-29 17:45:37 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2021-10-29 15:51:30 +0000
commitcfea51f40f3573098cf727a09825fa950d6b2f59 (patch)
tree7d55eb3e44f69747f482860c2a3042f135fe6d13 /utils
parentf3c161f72a17ed107d67d914305daa8bcd1bd9d3 (diff)
[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 <markus.heiser@darmarit.de>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/morty.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/morty.sh b/utils/morty.sh
index 3d2d8c46..60220df0 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" <<EOF
+go version | cut -d' ' -f 3
+EOF
}
remove_all() {