mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(gateway): Detect executables with 'ELF' string (#4974)
On some older systems (CentOS 7), `file gateway` will produce this: ``` firezone-gateway: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped ``` `ELF` is a much more reliable means of detecting the file is a binary executable.
This commit is contained in:
@@ -75,7 +75,7 @@ if [ ! -e /usr/local/bin/firezone-gateway ]; then
|
||||
# See https://www.github.com/firezone/firezone/releases for available binaries
|
||||
curl -fsSL ${FIREZONE_ARTIFACT_URL}/${FIREZONE_VERSION}/\$arch -o /tmp/firezone-gateway
|
||||
|
||||
if file /tmp/firezone-gateway | grep -q "executable"; then
|
||||
if file /tmp/firezone-gateway | grep -q "ELF"; then
|
||||
mv /tmp/firezone-gateway /usr/local/bin/firezone-gateway
|
||||
else
|
||||
echo "/tmp/firezone-gateway is not an executable!"
|
||||
|
||||
Reference in New Issue
Block a user