Patchwork lighttpd: introduce /etc/lighttpd.d subdir for config file includes

login
register
mail settings
Submitter Steffen Sledz
Date Feb. 11, 2014, 8:59 a.m.
Message ID <1392109171-29549-1-git-send-email-sledz@dresearch-fe.de>
Download mbox | patch
Permalink /patch/66575/
State New
Headers show

Comments

Steffen Sledz - Feb. 11, 2014, 8:59 a.m.
Extend default config file by a directive to include config file
fragments from /etc/lighttpd.d. This allows other web application
packages to put their configuration there.

Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
---
 meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf | 3 +++
 meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb     | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Steffen Sledz - Feb. 18, 2014, 7:30 a.m.
On 11.02.2014 09:59, Steffen Sledz wrote:
> Extend default config file by a directive to include config file
> fragments from /etc/lighttpd.d. This allows other web application
> packages to put their configuration there.
> 
> Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
> ---
>  meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf | 3 +++
>  meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb     | 3 ++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
> index 3342470..6e8402d 100644
> --- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
> +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
> @@ -326,3 +326,6 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
>  #include_shell "echo var.a=1"
>  ## the above is same as:
>  #var.a=1
> +
> +# include other config file fragments from lighttpd.d subdir
> +include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;" 
> diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
> index 2ddab16..2ea5f85 100644
> --- a/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
> +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
> @@ -5,6 +5,7 @@ BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
>  LICENSE = "BSD"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
>  
> +PR = "r1"
>  
>  SECTION = "net"
>  DEPENDS = "zlib libpcre"
> @@ -47,7 +48,7 @@ INITSCRIPT_PARAMS = "defaults 70"
>  SYSTEMD_SERVICE_${PN} = "lighttpd.service"
>  
>  do_install_append() {
> -	install -d ${D}${sysconfdir}/init.d ${D}/www/pages/dav
> +	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
>  	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
>  	install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
>  	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
> 

Ping!

Patch

diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
index 3342470..6e8402d 100644
--- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
@@ -326,3 +326,6 @@  static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
 #include_shell "echo var.a=1"
 ## the above is same as:
 #var.a=1
+
+# include other config file fragments from lighttpd.d subdir
+include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;" 
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
index 2ddab16..2ea5f85 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
@@ -5,6 +5,7 @@  BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
 
+PR = "r1"
 
 SECTION = "net"
 DEPENDS = "zlib libpcre"
@@ -47,7 +48,7 @@  INITSCRIPT_PARAMS = "defaults 70"
 SYSTEMD_SERVICE_${PN} = "lighttpd.service"
 
 do_install_append() {
-	install -d ${D}${sysconfdir}/init.d ${D}/www/pages/dav
+	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
 	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
 	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html