mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: [ptxdist] [PATCH 2/4] lighttpd: create /etc/lighttpd/conf.d in any case
Date: Sat, 20 Aug 2016 19:47:06 +0200	[thread overview]
Message-ID: <1471715228-16326-2-git-send-email-r.schwebel@pengutronix.de> (raw)
In-Reply-To: <1471715228-16326-1-git-send-email-r.schwebel@pengutronix.de>

Otherwhise 'systemctl status lighttpd' shows that include_shell in
lighttpd.conf tries to glob in a non-existing directory.

While being there, test if there are *.conf files before including them,
which also would give an error.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 projectroot/etc/lighttpd/lighttpd.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projectroot/etc/lighttpd/lighttpd.conf b/projectroot/etc/lighttpd/lighttpd.conf
index 34468ea..86048f0 100644
--- a/projectroot/etc/lighttpd/lighttpd.conf
+++ b/projectroot/etc/lighttpd/lighttpd.conf
@@ -69,5 +69,5 @@ mimetype.assign		= (
 
 index-file.names = ( "index.html" )
 
-include_shell "cat conf.d/*.conf"
+include_shell "[ \"$(ls -A conf.d/)\" ] && cat conf.d/*.conf"
 
-- 
2.8.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2016-08-20 17:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20 17:47 [ptxdist] [PATCH 1/4] dnsmasq: fix overwritten PKG_CONFIG Robert Schwebel
2016-08-20 17:47 ` Robert Schwebel [this message]
2016-08-20 17:47 ` [ptxdist] [PATCH 3/4] mono: version bump 2.10.1 -> 3.2.6 Robert Schwebel
2016-08-20 17:47 ` [ptxdist] [PATCH 4/4] host-qemu: enable libusb by default Robert Schwebel
2016-08-22  8:17   ` Robert Schwebel
2016-08-22  8:28 ` [ptxdist] [PATCH 1/4] dnsmasq: fix overwritten PKG_CONFIG Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471715228-16326-2-git-send-email-r.schwebel@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox