You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# webfish
|
|
|
|
|
|
|
|
An HTTP server which bites on Gitea POST webhooks
|
|
|
|
|
|
|
|
It utilizes the http://matetelki.eu:3000/denes/cpp_utils library.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
usage: ./webfish <ARGS> [OPTIONS]
|
|
|
|
|
|
|
|
Required arguments:
|
|
|
|
-c STRING Client hostname to check
|
|
|
|
-f STRING File to execute on receiving a message
|
|
|
|
-s STRING Look for a line in the msg body with '"secret": "SECRET"'
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-h, --help Prints this help message
|
|
|
|
-p INT Listenning port (default is 5050)
|
|
|
|
```
|
|
|
|
|
|
|
|
For example: `./webfish -c matetelki.eu -f ./hugo_updater.sh -s SECRET`
|
|
|
|
|
|
|
|
Todos:
|
|
|
|
- The `Content-Length: 1900` is disregarded. The secret is in the first chunk anyway:
|
|
|
|
- bad request? Reply & close connection.
|
|
|
|
- correct request? Reply after the first chunk, while the client is still talking.
|
|
|
|
- The `-h` does not work, only `./webfish -h, --help` :P
|
|
|
|
- The logging needs some tuning
|