diff --git a/bin/monitor.php b/bin/monitor.php index a71b3d9c2..2c429e503 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -2,7 +2,7 @@ require(dirname(__FILE__)."/config.php"); require(WWW_DIR.'/lib/postprocess.php'); -$version="0.1r767"; +$version="0.1r768"; $db = new DB(); @@ -42,6 +42,7 @@ $_php = $_nice." -n${array['NICENESS']} ".getenv('PHP'); $_tmux = getenv('TMUXCMD'); $_sed = getenv('SED'); $_tee = getenv('TEE'); +$_mysqladmin = getenv('MYSQLADMIN'); $_count_releases = 0; $_imports = $array['NZB_THREADS']; $_bin = dirname(__FILE__)."/../bin"; @@ -61,7 +62,7 @@ $_backfill_increment = "UPDATE groups set backfill_target=backfill_target+1 wher $mysql_command_1 = "$_mysql --defaults-file=$_conf/my.cnf -u$_DB_USER -h $_DB_HOST $_DB_NAME -e \"$_backfill_increment\""; $reset_bin = "UPDATE binaries SET procstat=0, procattempts=0, regexID=NULL, relpart=0, reltotalpart=0, relname=NULL;"; $mysql_command_2 = "$_mysql --defaults-file=$_conf/my.cnf -u$_DB_USER -h $_DB_HOST $_DB_NAME -e \"$reset_bin\""; -$mysqladmin = "/usr/bin/mysqladmin --defaults-file=$_conf/my.cnf -u$_DB_USER -h $_DB_HOST status | /usr/bin/awk '{print $22;}'"; +$mysqladmin = "$_mysqladmin --defaults-file=$_conf/my.cnf -u$_DB_USER -h $_DB_HOST status | /usr/bin/awk '{print $22;}'"; //got microtime function microtime_float() diff --git a/conf/jonnyboys_defaults.sh b/conf/jonnyboys_defaults.sh index 0853ae759..462410d35 100644 --- a/conf/jonnyboys_defaults.sh +++ b/conf/jonnyboys_defaults.sh @@ -513,6 +513,7 @@ command -v php5 >/dev/null 2>&1 && export PHP=`command -v php5` || { export PHP= command -v tmux >/dev/null 2>&1 || { echo >&2 "I require tmux but it's not installed. Aborting."; exit 1; } && export TMUXCMD=`command -v tmux` command -v nice >/dev/null 2>&1 || { echo >&2 "I require nice but it's not installed. Aborting."; exit 1; } && export NICE=`command -v nice` command -v tee >/dev/null 2>&1 || { echo >&2 "I require tee but it's not installed. Aborting."; exit 1; } && export TEE=`command -v tee` +command -v mysqladmin >/dev/null 2>&1 || { echo >&2 "I require mysqladmin but it's not installed. Aborting."; exit 1; } && export MYSQLADMIN=`command -v mysqladmin` if [[ $USE_HTOP == "true" ]]; then command -v htop >/dev/null 2>&1|| { echo >&2 "I require htop but it's not installed. Aborting."; exit 1; } && export HTOP=`command -v htop` diff --git a/config.sh b/config.sh index 80296bac8..645659a6d 100644 --- a/config.sh +++ b/config.sh @@ -513,6 +513,7 @@ command -v php5 >/dev/null 2>&1 && export PHP=`command -v php5` || { export PHP= command -v tmux >/dev/null 2>&1 || { echo >&2 "I require tmux but it's not installed. Aborting."; exit 1; } && export TMUXCMD=`command -v tmux` command -v nice >/dev/null 2>&1 || { echo >&2 "I require nice but it's not installed. Aborting."; exit 1; } && export NICE=`command -v nice` command -v tee >/dev/null 2>&1 || { echo >&2 "I require tee but it's not installed. Aborting."; exit 1; } && export TEE=`command -v tee` +command -v mysqladmin >/dev/null 2>&1 || { echo >&2 "I require mysqladmin but it's not installed. Aborting."; exit 1; } && export MYSQLADMIN=`command -v mysqladmin` if [[ $USE_HTOP == "true" ]]; then command -v htop >/dev/null 2>&1|| { echo >&2 "I require htop but it's not installed. Aborting."; exit 1; } && export HTOP=`command -v htop`