@@ -67,6 +67,42 @@ secondsBeforeTimeout=30
67
67
# We log the date
68
68
date > ${logOutput}
69
69
70
+
71
+ # ################################ Update IANA ##################################
72
+ # Update iana-domains-db
73
+ #
74
+ # @CalledBy installation
75
+ # ###############################################################################
76
+ updateIANA ()
77
+ {
78
+ # We set the url where we get the needed informations
79
+ local ianaURL=" https://www.iana.org/domains/root/db"
80
+
81
+ # Temporary file
82
+ local curlIANA=/var/tmp/${funilrys} -iana
83
+
84
+ # We delete old temporary files
85
+ rm funilrys* & > /dev/null
86
+
87
+ # We get a copy of the page
88
+ curl -s ${ianaURL} -o ${curlIANA}
89
+
90
+ while read -r line
91
+ do
92
+ # We get the valid domains extensions
93
+ regex=" (\/domains\/root\/db\/)(.*)(\.html)"
94
+
95
+ if [[ " ${line} " =~ ${regex} ]]
96
+ then
97
+ # We put it into a temporary file
98
+ echo " ${BASH_REMATCH[2]} " >> ${funilrys} _iana
99
+ fi
100
+ done < " ${curlIANA} "
101
+
102
+ # We move the generated file
103
+ mv ${funilrys} _iana iana-domains-db
104
+ }
105
+
70
106
# ############################### checkVersion ##################################
71
107
# This part is where we check the version
72
108
#
@@ -490,6 +526,7 @@ scriptsWorkDir()
490
526
printf ' \n'
491
527
elif [[ " ${executionType} " == ' production' ]]
492
528
then
529
+ updateIANA
493
530
echo " ${bold}${cyan} The production logic was successfully completed!${normal} "
494
531
echo " You can now distribute this repository."
495
532
printf ' \n'
0 commit comments