Changeset 1684

Show
Ignore:
Timestamp:
06/23/06 19:41:59 (2 years ago)
Author:
anarcat
Message:

rename slavedns.conf to defaults.conf and make the file a real defaults file that initializes the variables before each site

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc-slavedns/trunk/defaults.conf

    r1683 r1684  
    1 # Configuration file __SAMPLE__ for slavedns 
    2 # this file (called slavedns.conf) WILL ALWAYS BE IGNORED by the cron task. 
     1# Default configuration for alternc-slavedns 
     2# this file (called defaults.conf) WILL ALWAYS BE IGNORED by the cron task. 
    33#  
    4 # in this directory, you must put one file for each master dns server you wish to synchronize from
    5 # Each file contains shell variables and shell syntax must be correct. 
     4# This file is sourced from a bourne shell and shell syntax must be correct
     5# The defaults file is sourced before the site-specific configurations 
    66 
    77# you must set this or the full URL below 
    8 PROTOCOL=https 
    9 HOST=10.0.0.1 
     8PROTOCOL=http 
     9HOST= 
    1010 
    1111# Hostname http[s] of the master dns server, notice how it defaults to alternc setup 
     
    1717# Login of the slave to connect to the server (the primary dns administrator will give it to you.) 
    1818# optional 
    19 LOGIN=myaccount 
     19LOGIN= 
    2020 
    2121# Password of the slave to connect to the server 
    2222# optional 
    23 PASSWORD=mypass 
     23PASSWORD= 
    2424 
    2525# That's all. at most one hour after you put a new file in this directory,  
  • alternc-slavedns/trunk/slavedns

    r1682 r1684  
    1111WGETFLAGS="" 
    1212NAMED="/etc/init.d/bind restart"  
     13DEFAULTS="defaults.conf" 
     14DEFAULTSFILE="${CONFDIR}/${DEFAULTS}" 
    1315 
    1416for i 
     
    7476RELOAD="" 
    7577 
    76 # source defaults 
    77 . ./slavedns.conf 
    7878 
    7979for conf in ${CONFIGS} 
    8080do 
    81   [ "slavedns.conf" = "${conf}" ] && continue 
    82   # HOST LOGIN PASSWORD MASTERIP 
    83   URL="" 
    84   HOST="" 
    85   PROTOCOL="" 
    86   MASTERIP="" 
    87   LOGIN="" 
    88   PASSWORD="" 
    89   . ./${conf} 
     81  [ "${DEFAULTS}" = "${conf}" -o "slavedns.conf" = "${conf}" ] && continue 
     82  # source defaults 
     83  . ${DEFAULTSFILE} 
     84  # source this site's config 
     85  . ${conf} 
    9086  if [ -z "$URL" ] 
    9187  then