mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-06 02:39:21 +03:00
Making another attempt to deal with the ssl issue
This commit is contained in:
parent
aab81066cc
commit
e8477204a3
@ -5,11 +5,7 @@ if [ -n "$TRAVIS" ]; then
|
||||
echo 'Travis config not yet written'
|
||||
sudo cp -Rp $TRAVIS_BUILD_DIR/tests/resources /resources
|
||||
sudo /bin/bash /resources/Scripts/Provision.sh
|
||||
sudo stop dovecot
|
||||
sudo cp -p /resources/dovecot.pem /etc/ssl/private/
|
||||
sudo chgrp dovecot /etc/ssl/private/dovecot.pem
|
||||
sudo start dovecot
|
||||
|
||||
sudo /bin/bash /resources/Scripts/SSL.sh
|
||||
|
||||
else
|
||||
|
||||
|
34
tests/resources/Scripts/SSL.sh
Normal file
34
tests/resources/Scripts/SSL.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
stop dovecot
|
||||
|
||||
STARTPATH=`pwd`
|
||||
|
||||
SSL_CERT=/etc/ssl/certs/dovecot.pem
|
||||
SSL_KEY=/etc/ssl/private/dovecot.pem
|
||||
|
||||
echo "Creating generic self-signed certificate: $SSL_CERT"
|
||||
cd /etc/ssl/certs
|
||||
PATH=$PATH:/usr/bin/ssl
|
||||
FQDN=`hostname -f`
|
||||
MAILNAME=`cat /etc/mailname 2> /dev/null || hostname -f`
|
||||
(openssl req -new -x509 -days 365 -nodes -out $SSL_CERT -keyout $SSL_KEY > /dev/null 2>&1 <<+
|
||||
.
|
||||
.
|
||||
.
|
||||
Dovecot mail server
|
||||
$FQDN
|
||||
$FQDN
|
||||
root@$MAILNAME
|
||||
+
|
||||
) || echo "Warning : Bad SSL config, can't generate certificate."
|
||||
|
||||
|
||||
chown root $SSL_CERT || true
|
||||
chgrp dovecot $SSL_CERT || true
|
||||
chmod 0644 $SSL_CERT || true
|
||||
chown root $SSL_KEY || true
|
||||
chgrp dovecot $SSL_KEY || true
|
||||
chmod 0600 $SSL_KEY || true
|
||||
|
||||
start dovecot
|
Loading…
x
Reference in New Issue
Block a user