Update file run_onchange_after_24-vpn-linux.tmpl

This commit is contained in:
Brian Zalewski 2023-03-27 06:09:59 +00:00
parent 90d35fd355
commit c035fb4b9e

View file

@ -1,16 +1,14 @@
{{- if (eq .host.distro.family "linux") -}}
#!/usr/bin/env bash
{{ $ovpnUsername := (env "OVPN_USERNAME") }}
{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "OVPN_USERNAME")) }}
{{ $ovpnUsername := includeTemplate "secrets/OVPN_USERNAME" | decrypt }}
{{ else }}
{{ $ovpnUsername := (env "OVPN_USERNAME") }}
{{ $ovpnUsername := (includeTemplate "secrets/OVPN_USERNAME" | decrypt) }}
{{ end }}
{{ $ovpnPassword := (env "OVPN_PASSWORD") }}
{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "OVPN_PASSWORD")) }}
{{ $ovpnPassword := includeTemplate "secrets/OVPN_PASSWORD" | decrypt }}
{{ else }}
{{ $ovpnPassword := (env "OVPN_PASSWORD") }}
{{ $ovpnPassword := (includeTemplate "secrets/OVPN_PASSWORD" | decrypt) }}
{{ end }}
{{ includeTemplate "universal/profile" }}