Description
When the option --updateversion
is passed to mysqltuner.pl all of the updated file versions are downloaded into the present working directory. For instance, if I am in /tmp
and run the command /usr/local/mysqltuner/mysqltuner.pl --updateversion --cvefile /usr/local/mysqltuner/vulnerabilities.csv
all of the updates are downloaded via curl or wget to /tmp
Since I run mysqltuner.pl with a cron script these files are not getting updated. I have no idea where they (mysqltuner.pl vulnerabilities.csv basic_passwords.txt) are saving to.
The pertinent lines in mysqltuner.pl are 585-586
$update =
`$httpcli --connect-timeout 3 '$url$script' 2>$devnull > $script`;
Would there be a way to use the variables that are already set like $basic_password_files
and $opt{cvefile}
etc. to adjust the save path for $script
to the location where the user actually has mysqltuner.pl installed?
The other option I was thinking of was to change the code on line 586 to something along the lines of:
`$httpcli --connect-timeout 3 '$url$script' 2>$devnull > dirname(__FILE__)"/$script"`;
I don't know much perl so I can't be of much help here.