@@ -1,7 +1,7 @@
#!/bin/bash
#
# MySQL Backup Script
-# VER. 2.6.5 - http://sourceforge.net/projects/automysqlbackup/
+# VER. 2.6.8 - http://sourceforge.net/projects/automysqlbackup/
# Copyright (c) 2002-2003 wipe_out@lycos.co.uk
#
# This program is free software; you can redistribute it and/or modify
@@ -275,6 +275,8 @@
#=====================================================================
# Change Log
#=====================================================================
+# VER 2.6.8 - (2013-07-16)
+# - set PATH and rename MAIL variable
# VER 2.6.7 - (2013-07-09)
# - fix readlink endless loop in qmail detection code
# VER 2.6.6 - (2013-07-04)
@@ -401,6 +403,8 @@
#
# Full pathname to binaries to avoid problems with aliases and builtins etc.
#
+PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin
+
WHICH="`which which`"
AWK="`${WHICH} gawk`"
LOGGER="`${WHICH} logger`"
@@ -421,7 +425,7 @@
SED="`${WHICH} sed`"
GREP="`${WHICH} grep`"
NAIL="`${WHICH} nail 2>/dev/null`"
-MAIL="`${WHICH} mail 2>/dev/null`"
+MMAIL="`${WHICH} mail 2>/dev/null`"
SMBIN="`${WHICH} sendmail 2>/dev/null`"
READLINK="`${WHICH} readlink 2>/dev/null`"
@@ -445,14 +449,14 @@
}
if [ -z "${NAIL}" ] ; then
- if [ -n "${MAIL}" ] ; then
- if [ -n "`${MAIL} -r 2>&1 | grep \"invalid option -- r\"`" ]; then
+ if [ -n "${MMAIL}" ] ; then
+ if [ -n "`${MMAIL} -r 2>&1 | grep \"invalid option -- r\"`" ]; then
# mail doesn't support -r
echo "No working 'mail' command found"
echo "Install nail which support -r option!"
exit 1
else
- MAILCMD=${MAIL}
+ MAILCMD=${MMAIL}
fi
fi
else
|