Skip to content

Commit

Permalink
don't spam us with email please
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperWallace authored and root committed Apr 17, 2014
1 parent f761fb7 commit 826958c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion getcards.sh
@@ -1,4 +1,28 @@
#!/bin/bash

#
# XXX is this the best place to put these?
#
# symlink traversal attack?
#

cd /run/shm
curl -s -S -kf -o carddb.json.download --compressed https://london.hackspace.org.uk/carddb.php && mv carddb.json.download carddb.json
curl -s -S -kf -o carddb.json.download --compressed https://london.hackspace.org.uk/carddb.php > getcards.err 2>&1

if [ $? -eq 0 ] ; then
mv carddb.json.download carddb.json
if [ -e getcards.haderrors ] ; then
echo "doorbot is working now"
rm -f getcards.haderrors
fi
else
if [ ! -e getcards.haderrors ] ; then
echo "doorbot problems: "
echo
cat getcards.err ; rm -f getcards.err
echo ; echo "Further emails suppresed until getcards is working again"
touch getcards.haderrors
fi
fi

#curl -kf -o carddb.json.download --compressed https://85.119.83.146/carddb.php && mv carddb.json.download carddb.json

0 comments on commit 826958c

Please sign in to comment.