diff --git a/docs/PreHook-Command.md b/docs/PreHook-Command.md index 1da74c8..ce940d8 100644 --- a/docs/PreHook-Command.md +++ b/docs/PreHook-Command.md @@ -23,31 +23,26 @@ _Make sure you have the `jq` command available, as we're using it to parse the J
script.sh - ``` #!/bin/bash ip=$1 echo $ip >> ips.txt - ```
prehook.sh - ``` #!/bin/bash context=$(cat) ip=`echo $context | jq -r '.remoteAddr' | cut -d ':' -f 1` echo "{\"ip\": \"$ip\"}" - ```
hooks.json - ``` [ { "id": "log-ip", @@ -58,5 +53,4 @@ _Make sure you have the `jq` command available, as we're using it to parse the J ] } ] - ```
\ No newline at end of file