Comments (12)
Hi @m2acgi, you can specify the shell command to be used by execve as the 4th argument of the build.sh script.
I think that ./build.sh sample.sh 123456 sample "/bin/bash -s --"
would work, can you give it a try ?
from binsh.
Any update? If not I'll close the issue.
from binsh.
@olbat
It not working with "/bin/bash -s --"
, working with /bin/bash -s --
, but when shell script with multiple ssh command, it only execute the first one:
ssh [email protected] "echo 1"
ssh [email protected] "echo 2"
ssh [email protected] "echo 3"
Output:
1
from binsh.
Okay, I think that your issue is not really related to this script but more with the ssh command itself.
You should maybe use nohup, redirect the standard input&outputs, use the -T
option or close anything that's preventing your ssh command to return ...
Did you try to run your script from bash directly? (if yes, is it hanging?)
from binsh.
It's all ok when run shell script directly.
It's all ok when bilud directly.
There're some ssh issues when bilud with /bin/bash -s --
.
from binsh.
I must build with /bin/bash -s --
because some code in my script not compatible with /bin/dash
, it only compatible with /bin/bash
.
from binsh.
I think that it's related to the way both bash and ssh are dealing with standard input&outputs.
I tried to create a small example, got the same issue and managed to get it working using ssh -n
or adding </dev/null
after every ssh command.
Can you give it a try?
from binsh.
I've try the method you mentioned before. It can resolve this issue.
from binsh.
But I wanna to keep my script code clean. So fix the issue in binsh would be ok.
from binsh.
As I said it before I don't think that the issue is coming from binsh itself, or at least if it does there is nothing I think I can do about it (I want to keep the "pass the a key file from stdin" feature so the executable will continue to deal with the standard input the same way).
Anyway, if you have a good idea about where is this issue is coming from and how to fix it, feel free to open a pull request.
I'll try to find some time to reproduce on Debian this week. After that I'll close this issue if I don't get any news from you since there is a workaround to deal with it.
from binsh.
Another idea of a workaround if dash is really the issue here: you can try to change the default shell for your user using chsh.
from binsh.
Thank you. I'll try to change the shell from dash to bash.
from binsh.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binsh.