Skip to content

Commit

Permalink
fix: 1clk.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hax0r31337 committed Sep 6, 2024
1 parent 12db161 commit c892ff3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions 1clk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,18 @@ download_latest_release() {
curl https://github.com/hax0r31337/egressguy/releases/download/$version/egressguy_linux_$goarch -L -o $binary_file || exit 1

# check ELF header to ensure the binary is valid
readelf -h $binary_file > /dev/null

if [ $? -eq 0 ]; then
chmod +x $binary_file
echo $version > $version_file
else
if [ "$(head -c 4 $binary_file)" != $'\x7fELF' ]; then
echo "Failed to download egressguy binary."
rm -f $binary_file
exit 1
fi

chmod +x $binary_file
echo $version > $version_file
}

# download binary from github releases
if [ ! -f $version_file ]; then
if [ ! -f $version_file ] || [ ! -f $binary_file ]; then
mkdir -p $installation_path
download_latest_release
else
Expand Down
2 changes: 1 addition & 1 deletion main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func main() {
case <-timeoutChan:
conn.Close()
case <-conn.OnClose():
completed++
completed += uint64(requests)
}
}
}()
Expand Down

0 comments on commit c892ff3

Please sign in to comment.