conf: Ship default configuration and systemd units

Two configurations are supported:

1. A socket-activated, single-port client service arrangement, and
2. A port-templated client service

systemd's template-unit constraints prevent us from mapping ports to a
daemon configuration for the socket-activated case. To support multiple
concurrent console servers we have to revert to a standard daemon
arrangement where dropbear binds, listens and accepts its own
connections. This brings with it immediate memory overhead of running
dropbear before connections are received. As such configuration 2 is
opt-in as there are very few systems that require it.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ifbcac1b1ca75ab3ff08c73855d7ed2ebabc27c0a
diff --git a/conf/obmc-console-ssh@.service.in b/conf/obmc-console-ssh@.service.in
new file mode 100644
index 0000000..10e106b
--- /dev/null
+++ b/conf/obmc-console-ssh@.service.in
@@ -0,0 +1,17 @@
+[Unit]
+Description=Console Client on %i
+Wants=dropbearkey.service
+After=dropbearkey.service
+
+[Service]
+# Unit defaults to a templated service
+Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
+EnvironmentFile=/etc/default/dropbear
+EnvironmentFile=-/etc/default/obmc-console-client
+ExecStart=/usr/sbin/dropbear -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key -c "/usr/bin/obmc-console-client -c /etc/obmc-console/client.%i.conf" -p %i -F $DROPBEAR_EXTRA_ARGS
+SyslogIdentifier=console-client-%i
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+
+[Install]
+WantedBy=default.target