From fe0eccd53a530e30467ecc1fdab9d93a77b8bcd1 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 20 Sep 2018 14:23:54 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9placement=20des=20variables=20pour=20les?= =?UTF-8?q?=20binaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evomaintenance.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evomaintenance.sh b/evomaintenance.sh index 61b1b53..160e8b7 100644 --- a/evomaintenance.sh +++ b/evomaintenance.sh @@ -15,6 +15,9 @@ test -f /etc/evomaintenance.cf && . /etc/evomaintenance.cf PATH=${PATH}:/usr/sbin +SENDMAIL=$(command -v sendmail) +GIT_BIN=$(command -v git) + WHO=$(LC_ALL=C who -m) USER=$(echo ${WHO} | cut -d" " -f1) IP=$(echo ${WHO} | cut -d" " -f6 | sed -e "s/^(// ; s/)$//") @@ -52,7 +55,6 @@ echo "----------- ${NOW_ISO} ---------------" >> "${LOGFILE}" echo "${BLOB}" >> "${LOGFILE}" # git commit -GIT_BIN=$(command -v git) GIT_COMMITS="" if test -x "${GIT_BIN}"; then @@ -90,8 +92,6 @@ VALUES ('${HOSTNAME}','${USER}','${IP}','${BEGIN_DATE}',now(),'${SQL_TEXTE}') " psql ${PGDB} ${PGTABLE} -h ${PGHOST} # send mail -SENDMAIL=$(command -v sendmail) - MAIL_TEXTE=$(echo "${TEXTE}" | sed "s@/@\\\\\/@g") MAIL_GIT_COMMITS=$(echo "${GIT_COMMITS}" | sed "s@/@\\\\\/@g")