diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-11-21 16:04:51 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-11-21 16:04:51 +0100 |
commit | f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa (patch) | |
tree | 4614b4d4f985ee7d436c022c2a339892ea9dc7d6 | |
parent | 0d1edff21906e0ab1b1e2e6169c5ea53e9e19fae (diff) | |
download | impressive-display-f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa.tar.gz impressive-display-f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa.tar.bz2 impressive-display-f5eb8002f3cd33ba7182e07ea1f97b8a074e67aa.zip |
curl subprocess: Hide stderr when logging to syslog.
-rwxr-xr-x | bin/impressive-display | 9 |
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? |