Skip to content

Instantly share code, notes, and snippets.

@niccottrell
Forked from zhovner/etckeeper.sh
Last active December 23, 2015 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niccottrell/6610307 to your computer and use it in GitHub Desktop.
Save niccottrell/6610307 to your computer and use it in GitHub Desktop.
# After etckeeper installation
/etc/etckeeper/etckeeper.conf VCS="git"
etckeeper init && etckeeper commit
# ------
git config --global user.name "My Machine"
git config --global user.email "etckeeper@my.machine"
# ------
# Create a private repo on bitbucket.org
# and add ssh key on the site
cd /etc && git remote add origin ssh://git@bitbucket.org/USERNAME/REPO-NAME.git
echo "git show --stat" > /etc/.git/hooks/post-commit
echo "git push origin master" >> /etc/.git/hooks/post-commit
chmod +x /etc/.git/hooks/post-commit
# ------
крон /etc/cron.daily/etckeeper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment