This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ubuntu:merc_etc [2015/01/19 08:48] tschulz |
ubuntu:merc_etc [2015/05/05 12:59] (current) tschulz |
||
---|---|---|---|
Line 4: | Line 4: | ||
- 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>#!/bin/bash | ||
- | export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/tschulz/bin:/usr/local/kde4/bin:/usr/local/kde4/sbin:/netbootBin:~/scripts:/usr/local/games/bin:/usr/local/java/bin/:/usr/local/cyrus/bin:~/bin:/usr/local/kde4/bin:/usr/local/kde4/sbin:/netbootBin:~/scripts:/usr/local/games/bin:/usr/local/java/bin/:/usr/local/cyrus/bin:~/bin | + | export PATH=${PATH}:/usr/local/sbin:/usr/local/bin |
function commit_dir { if [ -d ${1} ] | function commit_dir { if [ -d ${1} ] | ||
Line 22: | Line 22: | ||
</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**. | ||
+ | |||
+ | |||
+ | ===== Setup Script ===== | ||
+ | |||
+ | <file bash> | ||
+ | mkdir /scripts | ||
+ | cd /scripts | ||
+ | wget -O commit_configs.sh http://wiki.sebeka.k12.mn.us/_export/code/ubuntu:merc_etc?codeblock=0 | ||
+ | chmod 755 commit_configs.sh | ||
+ | /scripts/commit_configs.sh | ||
+ | cd /etc/cron.daily | ||
+ | ln -s /scripts/commit_configs.sh | ||
+ | </file> |