From 58ecc2d8d5e6d0b3a2c86129a13e6680d802306f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 May 2017 18:03:46 +0100 Subject: [PATCH] Mobile ciphers --- src/freedombone-sec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone-sec b/src/freedombone-sec index d43a7259..611b7064 100755 --- a/src/freedombone-sec +++ b/src/freedombone-sec @@ -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 - sed -i "s|ssl_ciphers .*|ssl_ciphers '$SSL_CIPHERS';|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'