summaryrefslogtreecommitdiff
path: root/data/templates/system
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/system')
-rw-r--r--data/templates/system/curlrc.j2 (renamed from data/templates/system/curlrc.tmpl)0
-rw-r--r--data/templates/system/proxy.j27
-rw-r--r--data/templates/system/ssh_config.j2 (renamed from data/templates/system/ssh_config.tmpl)0
-rw-r--r--data/templates/system/sysctl.conf.j2 (renamed from data/templates/system/sysctl.conf.tmpl)4
4 files changed, 9 insertions, 2 deletions
diff --git a/data/templates/system/curlrc.tmpl b/data/templates/system/curlrc.j2
index be4efe8ba..be4efe8ba 100644
--- a/data/templates/system/curlrc.tmpl
+++ b/data/templates/system/curlrc.j2
diff --git a/data/templates/system/proxy.j2 b/data/templates/system/proxy.j2
new file mode 100644
index 000000000..215c4c5c2
--- /dev/null
+++ b/data/templates/system/proxy.j2
@@ -0,0 +1,7 @@
+# generated by system-proxy.py
+{% if url is vyos_defined and port is vyos_defined %}
+{# remove http:// prefix so we can inject a username/password if present #}
+export http_proxy=http://{{ username ~ ':' ~ password ~ '@' if username is vyos_defined and password is vyos_defined }}{{ url | replace('http://', '') }}:{{ port }}
+export https_proxy=$http_proxy
+export ftp_proxy=$http_proxy
+{% endif %}
diff --git a/data/templates/system/ssh_config.tmpl b/data/templates/system/ssh_config.j2
index 1449f95b1..1449f95b1 100644
--- a/data/templates/system/ssh_config.tmpl
+++ b/data/templates/system/ssh_config.j2
diff --git a/data/templates/system/sysctl.conf.tmpl b/data/templates/system/sysctl.conf.j2
index 3aa857647..59a19e157 100644
--- a/data/templates/system/sysctl.conf.tmpl
+++ b/data/templates/system/sysctl.conf.j2
@@ -1,7 +1,7 @@
# autogenerated by system_sysctl.py
{% if parameter is vyos_defined %}
-{% for k, v in parameter.items() %}
+{% for k, v in parameter.items() %}
{{ k }} = {{ v.value }}
-{% endfor %}
+{% endfor %}
{% endif %}