Skip to content

Commit 9421f1b

Browse files
committed
fix(router): check if there is certificates to generate
1 parent 4f54269 commit 9421f1b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

router/image/templates/generate-certs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ rm -rf $KEY_PATH
1818
mkdir -p $CERT_PATH
1919
mkdir -p $KEY_PATH
2020

21+
{{ if gt (len (lsdir "/deis/certs")) 0 }}
2122
while read etcd_path; do
2223
{{ range $cert := ls "/deis/certs" }}
2324
if [[ "$etcd_path" == "{{ $cert }}" ]]; then
@@ -29,4 +30,7 @@ EOF
2930
EOF
3031
fi{{ end }}
3132
done < /etc/ssl/deis_certs
33+
{{ else }}
34+
# there is no certificates to generate
35+
{{ end }}
3236

0 commit comments

Comments
 (0)