paste_holen.sh aktualisiert

This commit is contained in:
alf
2026-04-23 20:25:04 +00:00
parent 3034767608
commit 64a00e9b9c

View File

@ -1,11 +1,12 @@
#!/bin/bash
PASTE_ID="$1" # Aufruf: ./paste_holen.sh abc123
PASTE_ID="$1"
HOST="${2:-http://100.87.87.103:8184}"
if [ -z "$PASTE_ID" ]; then
echo "Verwendung: $0 <paste-id>"
echo "Verwendung: $0 <paste-id> [host]"
exit 1
fi
curl -s "https://pastebin.com/raw/$PASTE_ID"
curl -s "$HOST/api/v1/paste/$PASTE_ID" | \
python3 -c 'import json,sys; print(json.loads(sys.stdin.read())["files"][0]["content"])'