Created
July 5, 2017 23:38
-
-
Save lvnilesh/e0e536424c195e91c39719a88be6f51a to your computer and use it in GitHub Desktop.
revised publish.sh for https://aaronparecki.com/2016/11/19/15/self-hosted-facebook-live
This file contains 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 | |
file_root="/data/rec" | |
web_root="https://domain2.com" | |
micropub_endpoint=https://domain1.com/?micropub=endpoint | |
access_token=123123123 | |
# Create the post via Micropub and save the URL | |
url=`curl -i $micropub_endpoint -H "Authorization: Bearer $access_token" \ | |
-H "Content-Type: application/json" \ | |
-d '{"type":"h-entry","properties":{"content":[{"html":"<p>Streaming Live</p><iframe width=\"600\" height=\"340\" src=\"https://domain2.com/index.html\"></iframe>"}]}}' \ | |
| grep Location: | sed -En 's/^Location: (.+)/\1/p' | tr -d '\r\n'` | |
# Write the URL to a file | |
echo $url > $file_root/last-url.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The change is
[
and]
after the"content":