Commit 0fc0c3fa authored by Johannes Schilling's avatar Johannes Schilling
Browse files

cip-grafana-tempgraph-* scripts: use tempfiles and atomic mv

parent 78c65d48
......@@ -11,7 +11,9 @@ url() {
}
fetch() {
/usr/bin/curl -H 'X-Remote-User: nobody' "$(url "$1")" > "${OUTDIR}/${2}.png"
t=`mktemp`
/usr/bin/curl -H 'X-Remote-User: nobody' "$(url "$1")" > $t
mv $t "${OUTDIR}/${2}.png"
}
fetch "24 hours ago" day
......
......@@ -6,5 +6,7 @@ OUTDIR=/var/www/temperature
IMPORTFROM="https://cipmon.informatik.uni-erlangen.de/temperature"
for thing in day week month year; do
curl "${IMPORTFROM}/${thing}.png" > "${OUTDIR}/${thing}.png"
t=`mktemp`
curl "${IMPORTFROM}/${thing}.png" > $t
mv $t "${OUTDIR}/${thing}.png"
done
cip-foxtemp (8.1) unstable; urgency=medium
* cip-grafana-tempgraph-* scripts: use tempfiles and atomic mv
-- Johannes Schilling <johannes.schilling@cs.fau.de> Wed, 02 Aug 2017 22:52:05 +0200
cip-foxtemp (8) unstable; urgency=medium
* add cip-grafana-tempgraph-import
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment