simplify Git section
This commit is contained in:
parent
05335d7f08
commit
0cde3681a6
|
@ -67,10 +67,12 @@ LOG_TEXTE=$(echo "${TEXTE}" | sed 's/"/\\\"/g')
|
||||||
echo "${NOW} hostname=\"${HOSTNAME}\" user=\"${SUDO_USER}\" ip=\"${IP}\" begin_date=\"${BEGIN_YEAR} ${BEGIN_DATE}\" message=\"${LOG_TEXTE}\"" >> "${LOGFILE}"
|
echo "${NOW} hostname=\"${HOSTNAME}\" user=\"${SUDO_USER}\" ip=\"${IP}\" begin_date=\"${BEGIN_YEAR} ${BEGIN_DATE}\" message=\"${LOG_TEXTE}\"" >> "${LOGFILE}"
|
||||||
|
|
||||||
# git commit
|
# git commit
|
||||||
if (test -x /usr/bin/git); then
|
GIT_BIN=$(command -v git)
|
||||||
cd /etc/
|
|
||||||
git add .
|
if test -x "${GIT_BIN}"; then
|
||||||
GIT_COMMIT=$(git commit -a -m "$LOG_TEXTE" --author="$_USER <$_USER@evolix.net>")
|
export GIT_DIR=/etc/.git
|
||||||
|
${GIT_BIN} add .
|
||||||
|
${GIT_BIN} commit --all --message "${LOG_TEXTE}" --author="${_USER} <${_USER}@evolix.net>" --quiet
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# insert into PG
|
# insert into PG
|
||||||
|
|
Loading…
Reference in a new issue