2013-12-13 16:16:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
cd /etc/Pegasus
|
|
|
|
|
2014-08-12 10:40:10 +00:00
|
|
|
if [ ! -e /etc/Pegasus/ssl-ca.cnf ] || [ ! -e /etc/Pegasus/ssl-service.cnf] || [ ! -e /etc/Pegasus/server.pem ] ||
|
2013-12-13 16:16:16 +00:00
|
|
|
[ ! -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;
|