Well, you have two choices. Manage all your .sh scripts so you know what is happening with your system configuration. Or use etckeeper which pours things into a git repository, so you can play back your /etc changes.
Then use the
Some cool uses:
– For your web server configuration files if you have manually edited
You can install with apt-get so it is super convenient to use:
sudo apt-get install -y etckeeper
This will actually fail as the Ubuntu version use Bazaar, their version control system, so letâs make it work with git
# Substitute VCS=âgitâ for anything else already there
sudo sed -i â/^VCS=/dâ /etc/etckeeper/etckeeper.conf
sudo tee -a /etc/etckeeper/etckeeper.conf <<<âVCS=âgitâ'
# push to origin as a default
sudo sed -i â/^PUSH_REMOTE=/dâ /etc/etckeeper/etckeeper.conf
sudo tee -a /etc/etckeeper/etckeeper.conf <<<âPUSH_REMOTE=âoriginââ
Now you can just have etckeeper auto commit which is pretty cool assuming REPONAME is the repo youâve already created. Something like richtong/ubuntu-on-vmware-etckeeper.git. One detail is that you have to make sure that your root account has your .ssh keys for your git hub
sudo su
# Normally the home directory of root is /
mkdir -p ~/.ssh
# Copy your github.rsa into here
cp $YOUR_GIT_HUB_RSA_KEY ~/.ssh/
tee -a ~/.ssh/config <<<âIdentifyFile $YOUR_GIT_HUB_RSA_Yet"
# Go to the configuration directory.
cd /etc
# Initialize etckeeper.
sudo etckeeper init
# Add the remote repository.
sudo git remote add origin git@github.com:REPONAME
# First commit.
sudo etckeeper commit "Initial commit."
# Set the upstream and push.
git push -u origin master
# We're done here.
exit