User Tools

Site Tools


freebsd:merc_etc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
freebsd:merc_etc [2015/05/05 13:19]
tschulz created
freebsd:merc_etc [2015/05/05 13:20] (current)
tschulz [Setup Script]
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**.
  
Line 32: Line 32:
 chmod 755 commit_configs.sh chmod 755 commit_configs.sh
 /​scripts/​commit_configs.sh /​scripts/​commit_configs.sh
-cd /etc/cron.daily+cd /etc/periodic/daily/
 ln -s /​scripts/​commit_configs.sh ln -s /​scripts/​commit_configs.sh
 </​file>​ </​file>​
freebsd/merc_etc.1430849958.txt.gz · Last modified: 2015/05/05 13:19 by tschulz