2013-08-10 03:29:41 +02:00
|
|
|
#!/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
|
|
|
|
|
2015-09-26 03:47:30 +02:00
|
|
|
if python show-last-messages --api-key="$API_KEY" --user="$BOT_EMAIL" --streams="$STREAMS" --count="$COUNT"; then
|
2013-08-10 03:29:41 +02:00
|
|
|
echo "[`date`] Success";
|
|
|
|
mv output-candidate.html output/zulip.html
|
|
|
|
touch output/zulip.html
|
|
|
|
else
|
|
|
|
echo "[`date`] FAILURE";
|
|
|
|
fi
|
|
|
|
|
|
|
|
sleep 30;
|
|
|
|
|
|
|
|
done
|