tonikelope / megabasterd

Yet another unofficial (and ugly) cross-platform MEGA downloader/uploader/streaming suite.
GNU General Public License v3.0
4.57k stars 595 forks source link

Can't make linux script work in 'execute command for mega dl limit' #523

Closed valtoree closed 1 year ago

valtoree commented 1 year ago

Hi as above, I have set path to script /home/user/script.sh for 'Execute this command when MEGA download limit is reached' But never works. It works if im on terminal. What am I missing? Tx for your time.,

tonikelope commented 1 year ago

Hi!

You can test by launching the script like this (there is a button to test):

/usr/bin/sh /home/user/script.sh

valtoree commented 1 year ago

Ty for reply. Great work by the way. Unfortunately still not working 😪 I used both the flathub version and the downloaded portable version. There is no error message. Just does nothing 🤷 I even tried some other random command and same outcome. No response. No error message.

Regards

OgANDiBoY commented 1 year ago

Hello, same here on the latest portable version for Windows, the script does not run once reached the limit.

Thanks!

tomyummmm commented 1 year ago

What script are you running? Mine looks like this, it works fine. The other issue some might see is that script does not run the script even if limit is reached, until after 10 minutes. Can see my fix here in this issue #507

pwsh -NoProfile -command "C:\Program` Files\NordVPN\NordVPN.exe -c -g Singapore"

OgANDiBoY commented 1 year ago

I run a batch script that changes VPN (express VPN) using expresso , so it's just a batch script. btw, it's working well on 7.72, I tried 7.73 same bad behavior.

ill have a look at your fix, thanks!

tomyummmm commented 1 year ago

Ty for reply. Great work by the way. Unfortunately still not working 😪 I used both the flathub version and the downloaded portable version. There is no error message. Just does nothing 🤷 I even tried some other random command and same outcome. No response. No error message.

Regards

Hi, i just had some time to test it out in my Ubuntu 22.04 VM, it works fine with the portable version.

/usr/local/bin/zsh /home/user/Downloads/MegaBasterdLINUX/connect.sh

#!/bin/sh

nordvpn c Singapore

When i check with nordvpn status, it does switch servers whenever it hits the limit, or whenever i press the test button.

❯ nordvpn status 
Status: Connected
Hostname: sg510.nordvpn.com
IP: 203.x.x.x
Country: Singapore
City: Singapore
Current technology: NORDLYNX
Current protocol: UDP
Transfer: 214.72 MiB received, 15.67 MiB sent
Uptime: 8 minutes 3 seconds

❯ nordvpn status 
Status: Connected
Hostname: sg521.nordvpn.com
IP: 84.x.x.x
Country: Singapore
City: Singapore
Current technology: NORDLYNX
Current protocol: UDP
Transfer: 1.80 GiB received, 16.14 MiB sent
Uptime: 1 minute 24 seconds
valtoree commented 1 year ago

@tomyummmm tx 4 reply 👍. I will replicate on my end and hope it works 🤞

valtoree commented 1 year ago

🎉 it works now, only via portable not flatpak version. I will close the issue. Thank you all who replied 🎉🎉

anshITQA commented 11 months ago

Hi!

You can test by launching the script like this (there is a button to test):

/usr/bin/sh /home/user/script.sh

But what do I write in script. If download limit is reached, then obviously I want to do something to bypass the limit and continue downloading... so what do i need to write in that shell script which i need to keep in user directory?? I do not have a vpn that I can call via script but I do want to continue downloading...how?