From 794a16ee1375ebda97dfecf478b3d006445c2857 Mon Sep 17 00:00:00 2001 From: Adnan Hajdarevic Date: Thu, 19 Nov 2020 22:19:48 +0100 Subject: [PATCH] wip --- docs/PreHook-Command.md | 6 ------ 1 file changed, 6 deletions(-) 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