Mobile ciphers

This commit is contained in:
Bob Mottram 2017-05-25 18:03:46 +01:00
parent 21a3b97f6b
commit 58ecc2d8d5
1 changed files with 6 additions and 1 deletions

View File

@ -166,7 +166,12 @@ function change_website_settings {
cd $WEBSITES_DIRECTORY
for file in `dir -d *` ; do
sed -i "s|ssl_protocols .*|ssl_protocols $SSL_PROTOCOLS;|g" $WEBSITES_DIRECTORY/$file
if ! grep -q "Mobile compatible ciphers" $WEBSITES_DIRECTORY/$file; then
sed -i "s|ssl_ciphers .*|ssl_ciphers '$SSL_CIPHERS';|g" $WEBSITES_DIRECTORY/$file
else
sed -i "s|ssl_ciphers .*|ssl_ciphers '$SSL_CIPHERS_MOBILE';|g" $WEBSITES_DIRECTORY/$file
fi
done
systemctl restart nginx
echo $'Web security settings changed'