Implement #1483. Uses GIT if available.

This commit is contained in:
Benoît S. 2015-12-02 16:20:42 +01:00
parent ddbf1d2555
commit 6f7aa04bb0

View file

@ -44,6 +44,13 @@ echo "details = $TEXTE"
echo "To cancel, [Ctrl+C] else press [Enter]"
read enter
# git stuff
if (test -x /usr/bin/git); then
cd /etc/
git add .
GIT_COMMIT=$(git commit -a -m "$TEXTE" --author="$SUDO_USER <$SUDO_USER@evolix.net>")
fi
echo "
INSERT INTO evomaint(hostname,userid,ipaddress,begin_date,end_date,details)
VALUES ('$HOSTNAME','$SUDO_USER','$IP','$BEGIN_YEAR $BEGIN_DATE',now(),'$TEXTE') " | \