Skip to content

Instantly share code, notes, and snippets.

@benoitjpnet
Created August 9, 2013 14:49
Show Gist options
  • Save benoitjpnet/6194239 to your computer and use it in GitHub Desktop.
Save benoitjpnet/6194239 to your computer and use it in GitHub Desktop.
--- evomaintenance.old 2013-08-09 16:46:33.677096878 +0200
+++ evomaintenance.sh 2013-08-09 16:47:53.656405527 +0200
@@ -44,6 +44,13 @@
echo "To cancel, [Ctrl+C] else press [Enter]"
read enter
+# GIT part. Commit all modifications for /etc.
+if [ -d /etc/.git ]; then
+ cd /etc/
+ git add .
+ GIT_COMMIT=$(git commit -a -m "$TEXTE" --author="$SUDO_USER <[email protected]>")
+fi
+
echo "
INSERT INTO evomaint(hostname,userid,ipaddress,begin_date,end_date,details)
VALUES ('$HOSTNAME','$SUDO_USER','$IP','$BEGIN_YEAR $BEGIN_DATE',now(),'$TEXTE') " | \\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment