- if ! [ -e /etc/invirt/secrets/vnc.crt ]; then
- openssl req -new -x509 -nodes -sha1 -subj '/' -key /etc/invirt/secrets/vnc.pem \
- > /etc/invirt/secrets/vnc.crt
+ if ! [ -e /etc/invirt/vnc/server.crt ]; then
+ openssl req -new -x509 -nodes -sha1 -days 730 -subj "/CN=$(hostname -f)" -key /etc/invirt/vnc/server.pem \
+ > /etc/invirt/vnc/server.crt