From 501de530d11a72888842d952260071d3143ba2e9 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 13 Jan 2021 17:05:00 +0000 Subject: [PATCH] Adjust the example Etherpad API delete command Because our docker images include few CLI utilities, make the example so that we rely on outside utilities on the host system for making http connections to the API socket for simplicity. Change-Id: I6a8abdbb55120db7d0f0b97255824f5a8fac76cb --- doc/source/etherpad.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/source/etherpad.rst b/doc/source/etherpad.rst index 78be55359b..46043abf62 100644 --- a/doc/source/etherpad.rst +++ b/doc/source/etherpad.rst @@ -49,12 +49,14 @@ browser). This is fairly easily accomplished via the `HTTP API`_, but you need the key which is saved in a file on the server so it's easiest if done when SSH'd into it locally:: - /usr/local/bin/docker-compose -f /etc/etherpad-docker/docker-compose.yaml exec -T etherpad \ - bash -c "wget -qO- 'http://localhost:9001/api/1/deletePad?apikey='$(cat \ - /opt/etherpad-lite/APIKEY.txt)'&padID=XXXXXXXXXX'" + wget -qO- "http://localhost:9001/api/1/deletePad?apikey=$(sudo \ + docker-compose -f /etc/etherpad-docker/docker-compose.yaml exec etherpad \ + cat /opt/etherpad-lite/APIKEY.txt)&padID=XXXXXXXXXX" ; echo ...where XXXXXXXXXX is the pad's name as it appears at the end of its -URL. If all goes well, you should receive a response like:: +URL (the trailing echo is just because the API response doesn't end with +a newline and so your next appended shell prompt makes it harder to +read). If all goes well, you should receive a response like:: {"code":0,"message":"ok","data":null}