3 if [ "$(ls /etc/invirt/vnc-cert.d)" == "" ]; then
4 echo "E: No certs in /etc/invirt/vnc-cert.d/" >&2
5 echo " Put certificates for all Invirt VNC proxy servers in" >&2
6 echo " /etc/invirt/vnc-cert.d, then run this script again" >&2
10 TMP_DIR="$(mktemp -d)"
11 for i in $(ls /etc/invirt/vnc-cert.d/*.crt); do
12 keytool -noprompt -alias "${i%.crt}" -file "/etc/invirt/vnc-cert.d/$i" \
13 -keystore "$TMP_DIR/trust.store" -storepass "foobar"
16 jar uf /usr/share/invirt-vnc-client/VncViewer.jar -C "$TMP_DIR" trust.store