mirror of
https://github.com/adnanh/webhook.git
synced 2025-07-04 10:18:31 +00:00
wip
This commit is contained in:
parent
8431357269
commit
794a16ee13
1 changed files with 0 additions and 6 deletions
|
@ -23,31 +23,26 @@ _Make sure you have the `jq` command available, as we're using it to parse the J
|
|||
<details>
|
||||
<summary>script.sh</summary>
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
ip=$1
|
||||
|
||||
echo $ip >> ips.txt
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>prehook.sh</summary>
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
|
||||
context=$(cat)
|
||||
ip=`echo $context | jq -r '.remoteAddr' | cut -d ':' -f 1`
|
||||
|
||||
echo "{\"ip\": \"$ip\"}"
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>hooks.json</summary>
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"id": "log-ip",
|
||||
|
@ -58,5 +53,4 @@ _Make sure you have the `jq` command available, as we're using it to parse the J
|
|||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
</details>
|
Loading…
Add table
Add a link
Reference in a new issue