Files
zulip/tools/deprecated/iframe-bot/last-messages-wrapper.sh
Anders Kaseorg 207cf6302b Always start python via shebang lines.
This is preparation for supporting using Python 3 in production.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 14:46:37 -08:00

25 lines
549 B
Bash
Executable File

#!/bin/sh
## For some reason, this doesn't work with a bot user.
#BOT_EMAIL=bot1@customer3.invalid
#API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BOT_EMAIL=wdaher@gmail.com
API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
STREAMS="event1 hongkong etc"
COUNT=50
mkdir -p output
while true; do
if ./show-last-messages --api-key="$API_KEY" --user="$BOT_EMAIL" --streams="$STREAMS" --count="$COUNT"; then
echo "[`date`] Success";
mv output-candidate.html output/zulip.html
touch output/zulip.html
else
echo "[`date`] FAILURE";
fi
sleep 30;
done