I have a line of code which is downloading a file from my github. When I test this from command line it works as expected, but when I call this from a .sh from inside my plugin I get the following error

Code:
wget: error getting response: reset by peer.
I call the script like this:

/bin/busybox ash ./tmp/getfiles.sh

if I run the same script from command line it works. Can anyone shed any light? Is my script being called differently when being called from the plugin from a command line?

Thanks in advance