This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION=${VERSION:-1.24.2} | |
# Detect OS platform amd64 | |
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | |
ARCH=$(uname -m | tr '[:upper:]' '[:lower:]') | |
if [ "$ARCH" = "x86_64" ]; then | |
ARCH="amd64" | |
fi | |
# Detect OS platform arm64 | |
if [ "$ARCH" = "aarch64" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Prequesites | |
## jq curl | |
### | |
### Variables | |
LAPI="http://127.0.0.1:8080" | |
ORIGINS="crowdsec,cscli" ## Comma separated list of ORIGINS ## Dont include CAPI as capi will flush every 2 hours and will make your lights go wild | |
API_KEY="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMP_DIR=$(mktemp -d) | |
dump_tree() { | |
cscli "$1" list --output raw | cut -d, -f1 | grep -v ^name$ > "$TMP_DIR/$1.txt" | |
} | |
check_root() { | |
if [[ $EUID -ne 0 ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RE2_VERSION=${RE2_VERSION:-2023-03-01} | |
## Utilities ## | |
download() { | |
if [ -z "$1" ]; then | |
echo "download() requires a URL as first argument" | |
exit 1 | |
fi |
OlderNewer