diff --git a/contrib/update-ipsets.sh b/contrib/update-ipsets.sh index f283cde..396e2f2 100755 --- a/contrib/update-ipsets.sh +++ b/contrib/update-ipsets.sh @@ -1145,8 +1145,26 @@ update_web() { local x= all=() geolite2_country=() ipdeny_country=() i= to_all= - echo '' >${RUN_DIR}/sitemap.xml - echo '' >>${RUN_DIR}/sitemap.xml +cat >${RUN_DIR}/sitemap.xml < + + + ${WEB_URL/\?*/} + ${sitemap_date} + always + +EOFSITEMAPA + +if [ ! -z "${WEB_URL2}" ] +then +cat >>"${RUN_DIR}/sitemap.xml" < + ${WEB_URL2/\?*/} + ${sitemap_date} + always + +EOFSITEMAPB +fi echo >&2 printf >&2 "updating history... " @@ -1357,13 +1375,13 @@ fi # this has to be done after retention_detect() echo >"${RUN_DIR}"/${x}_changesets.csv "DateTime,AddedIPs,RemovedIPs" - tail -n ${WEB_CHARTS_ENTRIES} "${CACHE_DIR}/${x}/changesets.csv" | grep -v "^DateTime" >>"${RUN_DIR}/${x}_changesets.csv" + tail -n $[ WEB_CHARTS_ENTRIES + 1] "${CACHE_DIR}/${x}/changesets.csv" | grep -v "^DateTime" | tail -n +2 >>"${RUN_DIR}/${x}_changesets.csv" done echo >&2 mv -f "${RUN_DIR}"/*.{json,csv,xml} "${WEB_DIR}/" chown ${WEB_OWNER} "${WEB_DIR}"/* - chmod 0644 "${WEB_DIR}"/* + chmod 0644 "${WEB_DIR}"/*.{json,csv,xml} if [ ${PUSH_TO_GIT} -eq 1 ] then