File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,14 +10,15 @@ if [[ -f "$CONF" ]]; then
1010 ssl_protocol=" # Hardened TKL default\nSSLProtocol -all +TLSv1.2 +TLSv1.3"
1111 sed -Ei " \|^SSLProtocol| s|^(.*)|#\1\n$ssl_protocol |" " $CONF "
1212
13- cipher_suites=$( cat << EOF
13+ cipher_suites=$( cat << ' EOF ' | sed ':a;N;s/\n/\\n/g;ta'
1414# Explict Cipher suites recommended by Mozilla
1515# https://ssl-config.mozilla.org/#server=apache&version=2.4.65&config=intermediate&openssl=3.5.1&guideline=5.7
1616# (updated by TurnKey "common/conf/turnkey.d/zz-ssl-ciphers" script)
1717SSLCipherSuite ZZ_SSL_CIPHERS
1818EOF
1919 )
2020 sed -Ei " \|^SSLCipherSuite| s|^(.*)|#\1\n$cipher_suites |" " $CONF "
21+ sed -i " s/ZZ_SSL_CIPHERS/$( cat /tmp/ZZ_SSL_CIPHERS) /g" " $CONF "
2122
2223 cat >> " $CONF " << EOF
2324
Original file line number Diff line number Diff line change 11#! /bin/bash -e
22
3- # download mysqltuner
4- dl () {
5- if [[ " $FAB_HTTP_PROXY " ]]; then
6- PROXY=(--proxy " $FAB_HTTP_PROXY " )
7- fi
8- cd " $2 "
9- curl -L -f -O " ${PROXY[@]} " " $1 "
10- cd -
11- }
3+ . /usr/local/src/tkl-bashlib/init.sh
124
135# Install mysqltuner at "latest" tag (via gh_releases) and from core dev's
146# repo[1] - rather than separate "org" repo[2]
157#
168# [1] https://github.com/jmrenouard/MySQLTuner-perl
179# [2] https://github.com/major/MySQLTuner-perl
1810BIN=/usr/local/bin
19- VERSION=$( gh_releases jmrenouard/MySQLTuner-perl | sort -V | tail -1 )
11+ VERSION=master
2012REPO=" jmrenouard/MySQLTuner-perl"
21- URL=" https://raw.githubusercontent.com/$REPO /refs/tags /$VERSION "
13+ URL=" https://raw.githubusercontent.com/$REPO /refs/heads /$VERSION "
2214dl " $URL /mysqltuner.pl" $BIN
2315mv " $BIN /mysqltuner.pl" $BIN /mysqltuner
2416chmod +x " $BIN /mysqltuner"
Original file line number Diff line number Diff line change @@ -30,14 +30,6 @@ if [[ -f "$CONF" ]]; then
3030 sed -i " /tls_medium_cipherlist/ s|ZZ_SSL_CIPHERS|$SECURE_CIPHER_LIST |" $CONF
3131fi
3232
33- # Apache2
34- CONF=" /etc/apache2/mods-available/ssl.conf"
35- if [[ -f " $CONF " ]]; then
36- sed -i " s|^\(\s*SSLCipherSuite\s\+\).*$|\1${SECURE_CIPHER_LIST} |g" $CONF
37- a2enmod ssl
38- a2enconf security
39- fi
40-
4133# Nginx
4234CONF=" /etc/nginx/snippets/ssl.conf"
4335if [[ -f " $CONF " ]]; then
@@ -69,3 +61,5 @@ if [ -d "$PUREFTPDDIR" ]; then
6961 echo 1 > ${PUREFTPDDIR} /TLS
7062 echo HIGH:\! TLSv1:\! TLSv1.1:\! SSLv2:\! SSLv3:${SECURE_CIPHER_LIST} > ${PUREFTPDDIR} /TLSCipherSuite
7163fi
64+
65+ echo " $SECURE_CIPHER_LIST " > /tmp/ZZ_SSL_CIPHERS
Original file line number Diff line number Diff line change 11COMMON_OVERLAYS += apache
2- COMMON_CONF += apache-vhost apache-headers apache-security
2+ COMMON_CONF += apache-vhost apache-headers apache-security apache-ssl
You can’t perform that action at this time.
0 commit comments