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'