client script
This commit is contained in:
parent
65fc17d331
commit
c02abb516c
9
bp.sh
Executable file
9
bp.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
BP_ENDPOINT=${BROWNPAPER_ENDPOINT:-https://shimun.net/bp}
|
||||
CURL_ARGS="--write-out %{url_effective}\\n --silent -o /dev/null"
|
||||
GPG_ARGS="$([ ! -z "$BROWNPAPER_KEY" ] && echo "--local-user $BROWNPAPER_KEY")"
|
||||
if [ ! -z "$1" ]; then
|
||||
printf "$1" | gpg --sign -a $GPG_ARGS | curl -s --data @- -X POST $BP_ENDPOINT/new -Ls $CURL_ARGS
|
||||
else
|
||||
gpg --sign -a $GPG_ARGS | curl -s --data @- -X POST $BROWNPAPER_ENDPOINT/new -Ls $CURL_ARGS
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user