diff --git a/pubspace.sh b/pubspace.sh index 93e4c3f..53ff915 100644 --- a/pubspace.sh +++ b/pubspace.sh @@ -1,9 +1,16 @@ #!/bin/bash -FILE="$1" +set -e + +ACTORS_USER_ID="$1" +OWNER_USER_ID="$2" +NEXTCLOUD_RELATIVE_PATH="$3" +LOCALLY_AVAILABLE_FILE="$4" + +echo "RUNNING: ${FILE}" >> pubspace.log /usr/bin/curl \ -H "Content-Type: application/json" \ -X GET \ - -d "{\"file\":\"${FILE}\"}" \ + -d "{\"actor_id\":\"${ACTORS_USER_ID}\", \"owner_id\":\"${OWNER_USER_ID}\", \"rel_path\":\"${NEXTCLOUD_RELATIVE_PATH}\", \"local_path\":\"${LOCALLY_AVAILABLE_PATH}\"}" \ https://publish.lumbung.space