New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Var extip in info_distro.sh never gets populated? #2056

Closed
Bourne-ID opened this Issue Oct 23, 2018 · 2 comments

Comments

2 participants
@Bourne-ID
Member

Bourne-ID commented Oct 23, 2018

Code in question: https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/info_distro.sh#L165-L174

The cURL command appears to be incorrect as the variable extip is always going to be null - the command is directing the cURL output to file and any errors to /dev/null. Likewise if the command exit code is a failure code then it either echos the file location, or x.x.x.x if the file doesn't exist.

This doesn't seem correct given the variable usage, but I'm struggling to understand why a temporary file was used. Is there something I'm missing, or can the use of a temporary file be removed and the error handling of the command made more descriptive?

(Thanks to Coldster#4940 which pointed out the oddity)

Thanks,

@triage-new-issues triage-new-issues bot added the triage label Oct 23, 2018

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Nov 1, 2018

I remember the txt file being created to reduce the queries to ifconfig.co as there is a rate limit. But yeah I doesnt look right. the code will need to be reviewed

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Nov 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment