set home so .my.cnf is found as we run it as cron weekly
This commit is contained in:
parent
95c5cd82d9
commit
d4cccaa62f
1 changed files with 2 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
# set home as we runit as weekly cron, where HOME is /
|
||||
ENV['HOME'] = '/root'
|
||||
tables = %x{mysql -Bse "SELECT TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND Data_free > 0 AND ENGINE IN ('MyISAM','InnoDB','ARCHIVE')"}
|
||||
tables.each { |table|
|
||||
tableitems = table.chomp.split(/\t/)
|
||||
|
|
Loading…
Reference in a new issue