meganz / MEGAcmd

Command Line Interactive and Scriptable Application to access MEGA
Other
1.94k stars 407 forks source link

Log in to and interact with multiple Mega accounts #264

Open richardARPANET opened 5 years ago

richardARPANET commented 5 years ago

I'm currently building a system which will upload need to interact with multiple Mega accounts from the same machine, at the same time.

I see that MEGAcmd stores the session state in ~/.megaCmd/.

Is there any way to customize which directory MEGAcmd uses for that when I run each command? Or any other way to achieve what I'm looking for?

Thanks in advance!

edit:

this doesn't work despite the source code using the HOME env var:

HOME=/newhome/ mega-login <email> <password>
bibijaan commented 3 years ago

Any update?

TahirJalilov commented 2 years ago

Any solution?

Doom4535 commented 2 years ago

A hacky workaround until this is implemented might be to spin up multiple docker containers that each mount a different directory that corresponds with one of the Mega accounts?

c-tamias35 commented 1 year ago

Changing $HOME env var actually works, at least now. You must create the "/newhome/" directory, make sure to stop the server (process "mega-cmd-server") with the command mega-quit then execute your command again. You must stop the server mega-quit before you want to change $HOME.

HOME=/newhome/ mega-login <email> <password>