ehrenfeu / simplify Goto Github PK
View Code? Open in Web Editor NEWa collection of my personal shellscripts, mostly administration-related
License: GNU General Public License v3.0
a collection of my personal shellscripts, mostly administration-related
License: GNU General Public License v3.0
Simple shell script to automatically track changes in a directory tree.
The script was written and successfully tested on many hosts to track changes in /etc - please be aware that pushing the repo to a public git hosting service will reveal highly sensitive security information about the installation!
First, clone the repository containing this script. The proposed location is /opt (otherwise you have to adjust the cronjob, see below):
cd /opt
git clone http://github.com/ehrenfeu/simplify.git
Next, initialize the repo for the directory tree you'd like to track (/etc in this case), make sure only root can access the repository (so you don't accidentially leak the files to a regular user), add the ignores and configure git for the root user:
cd /etc
cp -v /opt/simplify/autogit/gitignore.etc .gitignore
git init
chmod go-rx .git
git add .
git config --global user.name "root (${HOSTNAME})"
git config --global user.email "root@${HOSTNAME}"
git commit -a -m "initial import of /etc on host '${HOSTNAME}'"
Finally, install and configure the cronjob that auto-commits all changes (adjust the cronjob-file to configure who will receive notification emails, where to find the "autogit" script and how often to run it):
cd /etc/cron.d/
cp -v /opt/simplify/autogit/cronjob.autogit-etc autogit-etc
vim autogit-etc
git add autogit-etc
git commit -m "add cronjob"
Optionally (but recommended) configure a remote repository to auto-push the changes. As mentioned, DO NOT USE a public service like github here, as this will compromise highly sensitive data:
git remote add origin git-repo-hosting-machine:etc-${HOSTNAME}.git
git push --all
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.