summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-11-21 16:04:51 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-11-21 16:04:51 +0100
commitf5eb8002f3cd33ba7182e07ea1f97b8a074e67aa (patch)
tree4614b4d4f985ee7d436c022c2a339892ea9dc7d6
parent0d1edff21906e0ab1b1e2e6169c5ea53e9e19fae (diff)
downloadimpressive-display-f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa.tar.gz
impressive-display-f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa.tar.bz2
impressive-display-f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa.zip
curl subprocess: Hide stderr when logging to syslog.
-rwxr-xr-xbin/impressive-display9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/impressive-display b/bin/impressive-display
index 2ddbc4f..bc0bac4 100755
--- a/bin/impressive-display
+++ b/bin/impressive-display
@@ -331,8 +331,13 @@ function download_pdffile {
if [ -f "$workdir/secrets/$THIS_HOSTNAME.secret" ]; then
NETRCFILE=" --netrc-file $workdir/secrets/${THIS_HOSTNAME}.secret"
fi
- if ! curl $NETRCFILE "$PDF_URI" 1> "$DOWNLOADED_FILE"; then
- $OUTPUT "The curl tool failed in retrieving PDF file."
+
+ if [ "x$LOG_TO_SYSLOG" = "xyes" ]; then
+ if ! curl $NETRCFILE "$PDF_URI" 1> "$DOWNLOADED_FILE" 2>/dev/null; then
+ $OUTPUT "The curl tool failed in retrieving PDF file. Run this tool interactively to debug problems."
+ fi
+ else
+ curl $NETRCFILE "$PDF_URI" 1> "$DOWNLOADED_FILE"
fi
# is the PDF file gzipped?