Browse Source

Improved code

bugfixes
gau1991 10 years ago
parent
commit
19ec4b5b66
  1. 6
      src/modules/debug/ee_mod_debug_mysql.sh

6
src/modules/debug/ee_mod_debug_mysql.sh

@ -22,10 +22,8 @@ function ee_mod_debug_mysql()
# Set a cron for slow query log
if [ ! -z $EE_DEBUG_IMPORT_SLOW_LOG ]; then
ee_cron_time=${EE_DEBUG_IMPORT_SLOW_LOG##*=}
if [ "$ee_cron_time" = "" ] || [ ! $ee_cron_time =~ "^[0-9]+$" ]; then
ee_cron_time=5
fi
crontab -l | sed '*/$ee_cron_time * * * * /usr/local/sbin/ee import-slow-log' | crontab -
[[ $ee_cron_time =~ ^-?[0-9]+$ ]] || ee_cron_time=5
crontab -l | { cat; echo "*/$ee_cron_time * * * * /usr/local/sbin/ee import-slow-log"; } | crontab -
fi
else

Loading…
Cancel
Save