description "openconnect vpn client daemon"

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

respawn
respawn limit 5 120

<% if @dnsupdate == false -%>
env DNS_UPDATE=no
export DNS_UPDATE
<% end -%>

exec cat /etc/openconnect/network.passwd | openconnect \
  <%= @url -%> \
  --syslog \
  --no-dtls \
  --script /etc/vpnc/vpnc-script \
<% unless @cacerts.empty? -%>
  --CAfile /etc/openconnect/network.cacerts \
<% end -%>
<% if @authgroup %>
  --authgroup=<%= @authgroup %>
<% end -%>
<% unless @servercert.empty? -%>
  --servercert <%= @servercert -%> \
<% end -%>
  --user <%= @user -%> \
  --passwd-on-stdin

description "openconnect vpn client daemon"

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

respawn
respawn limit 5 120

<% if @dnsupdate == false -%>
env DNS_UPDATE=no
export DNS_UPDATE
<% end -%>

exec cat /etc/openconnect/network.passwd | openconnect \
  <%= @url -%> \
  --syslog \
  --no-dtls \
  --script /etc/vpnc/vpnc-script \
<% unless @cacerts.empty? -%>
  --CAfile /etc/openconnect/network.cacerts \
<% end -%>
<% if @authgroup -%>
  --authgroup=<%= @authgroup %>
<% end -%>
<% unless @servercert.empty? -%>
  --servercert <%= @servercert -%> \
<% end -%>
  --user <%= @user -%> \
  --passwd-on-stdin

Remove the additional new line
Remove the additional new line

Any new options added to the commandline need to ensure
they don't insert a newline, which erb does without the '-' on the line,
as the command will be split in to two, one of which will probably
execute but without all the options you want.
