mirror of
https://github.com/moderntld/.o.git
synced 2024-05-11 05:54:56 +00:00
Update SOA when script is run
This commit is contained in:
13
db.o
13
db.o
@ -2,16 +2,3 @@
|
||||
|
||||
$ORIGIN o.
|
||||
$TTL 1D ; 1 day
|
||||
@ IN SOA ns11.opennic.glue. jonah.opennic.org. (
|
||||
2019032001 ; serial
|
||||
4H ; refresh (4 hours)
|
||||
1H ; retry (1 hour)
|
||||
1W ; expire (1 week)
|
||||
1H ; minimum (1 hour)
|
||||
)
|
||||
; TLD information
|
||||
IN NS ns11.opennic.glue.
|
||||
IN NS ns2.opennic.glue.
|
||||
;
|
||||
; Additional zones
|
||||
;
|
||||
|
24
update_o.sh
24
update_o.sh
@ -3,6 +3,8 @@
|
||||
|
||||
#Variables
|
||||
TLD='o'
|
||||
NS='ns11.opennic.glue.'
|
||||
EMAIL='jonah.opennic.org.'
|
||||
CHECKZONE=/usr/sbin/named-checkzone
|
||||
TMP_DEST='/tmp/db.o'
|
||||
WORK_DIR='/opt/tld/o/'
|
||||
@ -14,6 +16,26 @@ cd $WORK_DIR
|
||||
git fetch origin master > /dev/null
|
||||
git reset --hard origin/master > /dev/null
|
||||
|
||||
# ADD NEW SOA!
|
||||
{ echo "@ IN SOA $NS $EMAIL ("
|
||||
echo " `date +%s` ; serial"
|
||||
echo " 4H ; refresh (4 hours)"
|
||||
echo " 1H ; retry (1 hour)"
|
||||
echo " 1W ; expire (1 week)"
|
||||
echo " 1H ; minimum (1 hour)"
|
||||
echo " )"
|
||||
} >> $WORK_DIR$FILE_NAME
|
||||
|
||||
# ADD NAMESERVERS!
|
||||
{ echo "; TLD information"
|
||||
echo " IN NS ns11.opennic.glue."
|
||||
echo " IN NS ns2.opennic.glue."
|
||||
echo ";"
|
||||
echo "; Additional zones"
|
||||
echo ";"
|
||||
} >> $WORK_DIR$FILE_NAME
|
||||
|
||||
|
||||
for f in $FILES
|
||||
do
|
||||
cp $WORK_DIR$FILE_NAME $TMP_DEST
|
||||
@ -24,7 +46,7 @@ do
|
||||
echo "Failed to add ${f}.o to the main zone!"
|
||||
else
|
||||
echo "Processed ${f}.o Successfully"
|
||||
echo ";`git log --oneline -- $f | tail -n 1`" >> $FILE_NAME
|
||||
echo "; `git log --oneline -- $f | tail -n 1`" >> $FILE_NAME
|
||||
cat $f >> $FILE_NAME
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user