description "openconnect vpn client daemon"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 5 120

<% if %w{yes no}.include?(@dnsupdate) -%>
<% @dns_text="export DNS_UPDATE=" + @dnsupdate + "&&" %> 
<% end %>

exec <%= @dns_text %> echo <%= @password %> | openconnect <%= @gateway %>/github --no-dtls --script /etc/vpnc/vpnc-script --user <%= @user %> --passwd-on-stdin

description "openconnect vpn client daemon"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 5 120

<% if %w{yes no}.include?(@dnsupdate) -%>
env DNS_UPDATE=<%= @dnsupdate %>
export DNS_UPDATE
<% end -%>
exec echo <%= @password %> | openconnect <%= @gateway %>/github --no-dtls --script /etc/vpnc/vpnc-script --user <%= @user %> --passwd-on-stdin

Use upstart stanza to set openconnect env var.
Use upstart stanza to set openconnect env var.
