Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f761fb7
commit 826958c
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |