paulie420 wrote to All <=-
I know I've done this before - but lemme state what I'm doing. I'm
needing to run a bash script on an external server from a Mystic MPL. I setup SSH keys and I can run the script with a;
ssh user@x.x.x.x "bash /some/bash/script.sh"
But I don't want the USER to wait on that command to finish. (It
imports URLs a user enters into my ArchiveBox archive, but takes some minutes to finish...)
So if I was just gonna run the command on the BBS CLI, I think I could just do;
ssh user@x.x.x.x "bash /some/bash/script.sh" &
... is there some way I can successfully do this from the MPL? ... the
MPL runs that above command and the script keeps running, and finishes, but the user gets dumped out before its done?
... is there some way I can successfully do this from the MPL? ... the MPL runs that above command and the script keeps running, and finishes, but the user gets dumped out before its done?
I don't know diddly about Mystic or MPL, but is it just as simple as including the '&' in the call to bash, thusly:
ssh user@x.x.x.x "bash /some/bash/script.sh &" ?
You might get a better answer, but one option might be to get your MPL to create a semaphore - and then have a cron job run every minute looking
for it, and when it sees it, does what it needs to do.
I think there might even be a filewatcher daemon of sorts (never used one myself), that comes to life instantly it sees the semaphore - which
might be better if waiting up to 60s is not what you want...
ssh user@x.x.x.x "bash /some/bash/script.sh"
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 94 |
Nodes: | 16 (0 / 16) |
Uptime: | 09:06:02 |
Calls: | 5,137 |
Calls today: | 4 |
Files: | 8,491 |
D/L today: |
1 files (279K bytes) |
Messages: | 352,549 |