summaryrefslogtreecommitdiff
path: root/data/templates/conserver
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/conserver')
-rw-r--r--data/templates/conserver/conserver.conf.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/data/templates/conserver/conserver.conf.tmpl b/data/templates/conserver/conserver.conf.tmpl
new file mode 100644
index 000000000..ec0eca5f0
--- /dev/null
+++ b/data/templates/conserver/conserver.conf.tmpl
@@ -0,0 +1,38 @@
+### Autogenerated by service_serial-proxy.py ###
+
+# See https://www.conserver.com/docs/conserver.cf.man.html for additional options
+
+config * {
+}
+
+default * {
+ motd "VyOS Console Server"
+ # The character '&' in logfile names are substituted with the console name.
+ logfile /var/log/conserver/&.log;
+ timestamp "30m";
+ rw *;
+}
+
+##
+## list of consoles we serve
+##
+{% for key, value in device.items() %}
+{# Depending on our USB serial console we could require a path adjustment #}
+{% set path = '/dev' if key.startswith('ttyS') else '/dev/serial/by-bus' %}
+console {{ key }} {
+ master localhost;
+ type device;
+ device {{ path }}/{{ key }};
+ baud {{ value.speed }};
+ parity {{ value.parity }};
+ options {{ "!" if value.stop_bits == "1" }}cstopb;
+}
+{% endfor %}
+
+##
+## list of clients we allow
+##
+access * {
+ trusted 127.0.0.1;
+ allowed 127.0.0.1;
+}