mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-16 18:21:24 +01:00
Install sh alpine fixes (#2678)
* Made changes to the peer install script that makes it work on alpine linux without changes * fix small oversight with doas fix * use try catch approach when curling binaries
This commit is contained in:
parent
16179db599
commit
24c0aaa745
@ -21,6 +21,8 @@ SUDO=""
|
|||||||
|
|
||||||
if command -v sudo > /dev/null && [ "$(id -u)" -ne 0 ]; then
|
if command -v sudo > /dev/null && [ "$(id -u)" -ne 0 ]; then
|
||||||
SUDO="sudo"
|
SUDO="sudo"
|
||||||
|
elif command -v doas > /dev/null && [ "$(id -u)" -ne 0 ]; then
|
||||||
|
SUDO="doas"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z ${NETBIRD_RELEASE+x} ]; then
|
if [ -z ${NETBIRD_RELEASE+x} ]; then
|
||||||
@ -68,7 +70,7 @@ download_release_binary() {
|
|||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
if [ -n "$GITHUB_TOKEN" ]; then
|
||||||
cd /tmp && curl -H "Authorization: token ${GITHUB_TOKEN}" -LO "$DOWNLOAD_URL"
|
cd /tmp && curl -H "Authorization: token ${GITHUB_TOKEN}" -LO "$DOWNLOAD_URL"
|
||||||
else
|
else
|
||||||
cd /tmp && curl -LO "$DOWNLOAD_URL"
|
cd /tmp && curl -LO "$DOWNLOAD_URL" || curl -LO --dns-servers 8.8.8.8 "$DOWNLOAD_URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -316,7 +318,7 @@ install_netbird() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
version_greater_equal() {
|
version_greater_equal() {
|
||||||
printf '%s\n%s\n' "$2" "$1" | sort -V -C
|
printf '%s\n%s\n' "$2" "$1" | sort -V -c
|
||||||
}
|
}
|
||||||
|
|
||||||
is_bin_package_manager() {
|
is_bin_package_manager() {
|
||||||
|
Loading…
Reference in New Issue
Block a user