source: trunk/packages/invirt-vnc-client/debian/invirt-update-vnc-cert.sh @ 1341

Last change on this file since 1341 was 1336, checked in by broder, 16 years ago

Add a script to regenerate the VNC client's certificate store

  • Property svn:executable set to *
File size: 582 bytes
RevLine 
[1336]1#!/bin/bash
2
3if [ "$(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
7    exit 1
8fi
9
10TMP_DIR="$(mktemp -d)"
11for 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"
14done
15
16jar uf /usr/share/invirt-vnc-client/VncViewer.jar -C "$TMP_DIR" trust.store
17
18rm -rf "$TMP_DIR"
Note: See TracBrowser for help on using the repository browser.