This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
freebsd:merc_etc [2015/05/05 13:19] tschulz created |
freebsd:merc_etc [2015/05/05 13:20] tschulz |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Storing Open Source Configs in Mercurial ====== | + | ====== Storing Open Source Configs in Mercurial (BSD) ====== |
* One of the best features about revision control systems is that nothing is ever deleted, so it would be really handy to store server configs in a distributed revision control system like mercurial. The following is one way this can be accomplished without the administrator is remember to run commits | * One of the best features about revision control systems is that nothing is ever deleted, so it would be really handy to store server configs in a distributed revision control system like mercurial. The following is one way this can be accomplished without the administrator is remember to run commits | ||
- | - create a script **/scripts/commit_configs.sh**<file bash /scripts/commit_configs.sh>#!/bin/bash | + | - create a script **/scripts/commit_configs.sh**<file bash /scripts/commit_configs.sh>#!/usr/local/bin/bash |
export PATH=${PATH}:/usr/local/sbin:/usr/local/bin | export PATH=${PATH}:/usr/local/sbin:/usr/local/bin | ||
Line 19: | Line 20: | ||
commit_dir /etc/ | commit_dir /etc/ | ||
- | commit_dir /usr/local/etc/ | + | commit_dir /usr/local/etc/</file>This script will init a repo to the two etc dirs and update the repo as changes are made to the config in each directory. You can add new entries at the bottom of the script to have make mercurial repos for more config directories. |
- | </file>This script will init a repo to the two etc dirs and update the repo as changes are made to the config in each directory. You can add new entries at the bottom of the script to have make mercurial repos for more config directories. | + | |
- Next link the script **/scripts/commit_configs.sh** to one for the periodic directories or made a entry in **/etc/crontab**. | - Next link the script **/scripts/commit_configs.sh** to one for the periodic directories or made a entry in **/etc/crontab**. | ||