summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2018-02-07 15:40:04 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2018-02-07 15:40:04 (GMT)
commit931b2a5b4b2bc774496486dc75c0fcdd72208019 (patch)
treecb24882c82f63a822f035f6f7419867d47097fc9
parent8489c8b9b02aa3294ca817a0a093a48b132ef634 (diff)
downloadauthentic2-supann-931b2a5b4b2bc774496486dc75c0fcdd72208019.zip
authentic2-supann-931b2a5b4b2bc774496486dc75c0fcdd72208019.tar.gz
authentic2-supann-931b2a5b4b2bc774496486dc75c0fcdd72208019.tar.bz2
load-multiple-federations.sh: supprime les fichiers temporaires (fixes #21692)v0.25
La façon dont cela était fait ne marchait pas.
-rwxr-xr-xload-multiple-federations.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/load-multiple-federations.sh b/load-multiple-federations.sh
index 3f32ab0..0e9914e 100755
--- a/load-multiple-federations.sh
+++ b/load-multiple-federations.sh
@@ -9,11 +9,7 @@ METADATA_TMP=`tempfile`
FIXTURE_TMP=`tempfile --suffix=.json`
TIMEOUT=30
-function cleanup {
- rm -f $METADATA_TMP $FIXTURE_TMP
-}
-
-trap "cleanup" EXIT
+trap "rm -f $METADATA_TMP $FIXTURE_TMP" EXIT
if [ -f ]; then
. /etc/default/authentic2
@@ -72,6 +68,8 @@ chmod +r $METADATA_TMP
# Load metadata
/usr/bin/authentic2-ctl sync-metadata --source=$SOURCE --sp -v1 $METADATA_TMP
+
+rm -f $METADATA_TMP $FIXTURE_TMP
}
for config in /etc/authentic2/federations.d/*.sh; do