You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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,
The text was updated successfully, but these errors were encountered:
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
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,
The text was updated successfully, but these errors were encountered: