d04944fa9d
Autossh parameters are only the monitoring port and the -f flag, the rest are not specific to autossh but they belong to ssh. Instead of complicating the signature of the class, let's just put all ssh args as an array and expose monitoring and background mode flags. Change-Id: I886edb0a3ed61b81060db39a2b4ab1bb70658f44
6 lines
431 B
Plaintext
6 lines
431 B
Plaintext
<% if @user == 'root' %>
|
|
/usr/lib/autossh/autossh -M <%= monitoring_port %> <% if @run_in_background %> -f <% end %> <%= @ssh_args %> -i <%= @ssh_key %> <%= @ssh_user %>@<%= @ssh_host %> -p <%= @ssh_port %>
|
|
<% else %>
|
|
su <%= @user %> -c '/usr/lib/autossh/autossh -M <%= monitoring_port %> <% if @run_in_background %> -f <% end %> <%= @ssh_args %> -i <%= @ssh_key %> <%= @ssh_user %>@<%= @ssh_host %> -p <%= @ssh_port %>'
|
|
<% end %>
|