mirror of
https://github.com/searxng/searxng.git
synced 2024-11-23 03:11:00 +00:00
[mod] utils/filtron.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>
This commit is contained in:
parent
064b545f14
commit
d8d6c3d4ee
1 changed files with 13 additions and 1 deletions
|
@ -42,7 +42,8 @@ SERVICE_GROUP="${SERVICE_USER}"
|
||||||
SERVICE_GROUP="${SERVICE_USER}"
|
SERVICE_GROUP="${SERVICE_USER}"
|
||||||
|
|
||||||
GO_ENV="${SERVICE_HOME}/.go_env"
|
GO_ENV="${SERVICE_HOME}/.go_env"
|
||||||
GO_PKG_URL="https://golang.org/dl/go1.17.2.linux-amd64.tar.gz"
|
GO_VERSION="go1.17.2"
|
||||||
|
GO_PKG_URL="https://golang.org/dl/${GO_VERSION}.linux-amd64.tar.gz"
|
||||||
GO_TAR=$(basename "$GO_PKG_URL")
|
GO_TAR=$(basename "$GO_PKG_URL")
|
||||||
|
|
||||||
APACHE_FILTRON_SITE="searx.conf"
|
APACHE_FILTRON_SITE="searx.conf"
|
||||||
|
@ -268,6 +269,17 @@ install_check() {
|
||||||
fi
|
fi
|
||||||
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() {
|
remove_all() {
|
||||||
|
|
Loading…
Reference in a new issue