tog-pegasus/generate-certs

15 lines
627 B
Bash
Executable File

#!/bin/bash
cd /etc/Pegasus
if [ ! -e /etc/Pegasus/ssl.cnf ] || [ ! -e /etc/Pegasus/server.pem ] ||
[ ! -e /etc/Pegasus/file.pem ] || [ ! -e /etc/Pegasus/client.pem ]; then
if [ -x /usr/share/Pegasus/scripts/genOpenPegasusSSLCerts ]; then
# Create self-signed certificates for initial usage
/usr/share/Pegasus/scripts/genOpenPegasusSSLCerts
# Add the self-signed certificate to the local trust store
cp /etc/Pegasus/ca.crt \
/etc/pki/ca-trust/source/anchors/localhost-pegasus.pem
/usr/bin/update-ca-trust extract
fi;
fi;