Skip to content

Commit 77763b4

Browse files
committed
mysqltuner install fix
1 parent 6639d5d commit 77763b4

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

conf/mysql

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ dl() {
66
cd $2; curl -L -f -O $PROXY $1; cd -
77
}
88

9-
# Install mysqltuner as recommended:
10-
# https://github.com/major/MySQLTuner-perl#downloadinstallation
9+
# Install mysqltuner at "latest" tag (via gh_releases) and from core dev's
10+
# repo[1] - rather than separate "org" repo[2]
11+
#
12+
# [1] https://github.com/jmrenouard/MySQLTuner-perl
13+
# [2] https://github.com/major/MySQLTuner-perl
1114
BIN=/usr/local/bin
12-
URL="https://raw.githubusercontent.com/major/MySQLTuner-perl/master"
13-
dl $URL/mysqltuner.pl $BIN
14-
mv $BIN/mysqltuner.pl $BIN/mysqltuner
15-
chmod +x $BIN/mysqltuner
16-
dl $URL/basic_passwords.txt $BIN
17-
dl $URL/vulnerabilities.csv $BIN
15+
VERSION=$(gh_releases jmrenouard/MySQLTuner-perl | sort -V | tail -1)
16+
REPO="jmrenouard/MySQLTuner-perl"
17+
URL="https://raw.githubusercontent.com/$REPO/refs/tags/$VERSION"
18+
dl "$URL/mysqltuner.pl" $BIN
19+
mv "$BIN/mysqltuner.pl" $BIN/mysqltuner
20+
chmod +x "$BIN/mysqltuner"
21+
dl "$URL/basic_passwords.txt" $BIN
22+
dl "$URL/vulnerabilities.csv" $BIN
1823

1924
# As of Debian Buster, there is no longer a /etc/init.d/mysql script, so let's
2025
# link the mariadb one.

0 commit comments

Comments
 (0)