n0nick / shaft

An SSH tunnel assistant for the command line.
http://n0nick.github.com/shaft/
MIT License
6 stars 1 forks source link

Offer to restart tunnels #10

Open gersht opened 11 years ago

gersht commented 11 years ago

When trying to shaft start [tunnelname], the tunnel may already be active. in that caser you issue a message saying Error: tunnel [tunnelname[ already active! - maybe offer to restart it?

Something in the line of:

Error: tunnel [tunnelname] already active! Would you like to restart it? [(Y)es/(N)o] >

n0nick commented 11 years ago

I'm not sure about interactive commands, I like to have everything be independent (so you could use it in scripts etc.). How would you feel about a --restart flag that restarts a tunnel if it's already active?

n0nick commented 11 years ago

BTW, it's precisely the use case for which I wrote myself this shell script: https://gist.github.com/5548625

so I agree something can be done here.