12345678910111213141516171819 |
- #!/bin/sh
- cp ${WORKSPACE}/template.infoclinica.lan.zone ${WORKSPACE}/infoclinica.lan.zone
- cd ${OVPN_GIT_NAME}/${OVPN_GIT_NAME}/ccd
- IFS=$'\n'
- for i in `ls`
- do
- file=$(echo -n ${i}|sed 's/ /-/g'|sed 's/\./-/g'|tr '[:upper:]' '[:lower:]')
- j=$(grep -o "10\.10\.20\.[0-9]\{1,3\}" ${i})
- if [ -z ${j} ]
- then
- echo ${j}
- else
- echo -e "${file}\tIN\tA\t${j}" >> ${WORKSPACE}/infoclinica.lan.zone
- fi
- done
- sed -i "s/.*; serial.*/ $1 ; serial/" ${WORKSPACE}/infoclinica.lan.zone
|