Initial commit
This commit is contained in:
19
shell_ntfy_paperless.sh
Normal file
19
shell_ntfy_paperless.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Variablen
|
||||||
|
FILE_PATH="/home/thorsten/Schreibtisch/Neuer Ordner/gotify.png"
|
||||||
|
FILE_NAME="gotify.png"
|
||||||
|
SERVER_URL="http://192.168.178.25:5885/attachments"
|
||||||
|
AUTH_TOKEN="tk_jtt0zcnmephixstrp9tleb6klf0zu"
|
||||||
|
|
||||||
|
# Curl Befehl ausführen und die Antwort speichern
|
||||||
|
RESPONSE=$(curl -s -X PUT "$SERVER_URL" \
|
||||||
|
-H "Authorization: Bearer $AUTH_TOKEN" \
|
||||||
|
-T "$FILE_PATH" \
|
||||||
|
-H "Filename: $FILE_NAME")
|
||||||
|
|
||||||
|
# URL aus der Antwort extrahieren
|
||||||
|
URL=$(echo $RESPONSE | jq -r '.url')
|
||||||
|
|
||||||
|
# Ergebnis anzeigen
|
||||||
|
echo "Datei hochgeladen. Zugriff auf die Datei unter: $URL"
|
||||||
Reference in New Issue
Block a user