Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CIP-Admins
cip-foxtemp
Commits
d15c6c3f
Commit
d15c6c3f
authored
Aug 06, 2017
by
Julian Brost
Browse files
create tempfiles in output directory
otherwise move isn't atomic if /tmp is a different filesystem
parent
2fa869d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
cip-grafana-tempgraph-extract
View file @
d15c6c3f
...
...
@@ -11,8 +11,8 @@ url() {
}
fetch
()
{
t
=
`
mktemp
`
curl
--silent
-H
'X-Remote-User: nobody'
"
$(
url
"
$1
"
)
"
>
$t
t
=
$(
mktemp
-p
"
$OUTDIR
"
)
curl
--silent
-H
'X-Remote-User: nobody'
"
$(
url
"
$1
"
)
"
>
"
$t
"
mv
$t
"
${
OUTDIR
}
/
${
2
}
.png"
}
...
...
cip-grafana-tempgraph-import
View file @
d15c6c3f
...
...
@@ -6,7 +6,7 @@ OUTDIR=/var/www/temperature
IMPORTFROM
=
"https://cipmon.informatik.uni-erlangen.de/temperature"
for
thing
in
day week month year
;
do
t
=
`
mktemp
`
curl
--silent
"
${
IMPORTFROM
}
/
${
thing
}
.png"
>
$t
t
=
$(
mktemp
-p
"
$OUTDIR
"
)
curl
--silent
"
${
IMPORTFROM
}
/
${
thing
}
.png"
>
"
$t
"
mv
$t
"
${
OUTDIR
}
/
${
thing
}
.png"
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment