[PATCH 1/3] makes fff-web config a uci-defaults script

mayosemmel mayosemmel at googlemail.com
Do Jun 9 14:16:36 CEST 2016


sieht gut aus:
Reviewed-by: Jan Kraus <mayosemmel at gmail.com>

Am Mittwoch, den 08.06.2016, 10:24 +0200 schrieb Tobias Klaus:
> Signed-off-by: Tobias Klaus <tk+ff at meskal.net>
> ---
>  src/packages/fff/fff-web/files/etc/config/uhttpd   | 35 ----------------------
>  .../fff-web/files/etc/uci-defaults/93-fff-uhttpd   | 34 +++++++++++++++++++++
>  2 files changed, 34 insertions(+), 35 deletions(-)
>  delete mode 100644 src/packages/fff/fff-web/files/etc/config/uhttpd
>  create mode 100644 src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd
> 
> diff --git a/src/packages/fff/fff-web/files/etc/config/uhttpd b/src/packages/fff/fff-web/files/etc/config/uhttpd
> deleted file mode 100644
> index bf95281..0000000
> --- a/src/packages/fff/fff-web/files/etc/config/uhttpd
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -
> -config uhttpd public
> -	list listen_http 80
> -	option home /www/public
> -	option rfc1918_filter 1
> -	option cgi_prefix /cgi-bin
> -	option script_timeout 60
> -	option network_timeout 30
> -	option tcp_keepalive 1
> -	option config "_"
> -
> -config uhttpd ssl
> -	list listen_https 443
> -	option home /www/ssl
> -	option rfc1918_filter 1
> -	option cert /etc/uhttpd.crt
> -	option key /etc/uhttpd.key
> -	option cgi_prefix /cgi-bin
> -	option script_timeout 60
> -	option network_timeout 30
> -	option tcp_keepalive 1
> -	option config "/etc/httpd.conf"
> -
> -
> -# Certificate defaults for px5g key generator
> -config cert px5g
> -
> -# Validity time
> -option days 1400
> -
> -# RSA key size
> -option bits 2048
> -
> -# Common name
> -option commonname OpenWrt
> diff --git a/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd b/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd
> new file mode 100644
> index 0000000..ab96acf
> --- /dev/null
> +++ b/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd
> @@ -0,0 +1,34 @@
> +#!/bin/sh
> +
> +uci batch <<EOF
> +  delete uhttpd.public
> +  delete uhttpd.ssl
> +  delete uhttpd.px5g
> +  set uhttpd.public=uhttpd
> +  add_list uhttpd.public.listen_http='80'
> +  set uhttpd.public.home='/www/public'
> +  set uhttpd.public.rfc1918_filter='1'
> +  set uhttpd.public.cgi_prefix='/cgi-bin'
> +  set uhttpd.public.script_timeout='60'
> +  set uhttpd.public.network_timeout='30'
> +  set uhttpd.public.tcp_keepalive='1'
> +  set uhttpd.public.config='_'
> +  set uhttpd.ssl=uhttpd
> +  add_list uhttpd.ssl.listen_https='443'
> +  set uhttpd.ssl.home='/www/ssl'
> +  set uhttpd.ssl.rfc1918_filter='1'
> +  set uhttpd.ssl.cert='/etc/uhttpd.crt'
> +  set uhttpd.ssl.key='/etc/uhttpd.key'
> +  set uhttpd.ssl.cgi_prefix='/cgi-bin'
> +  set uhttpd.ssl.script_timeout='60'
> +  set uhttpd.ssl.network_timeout='30'
> +  set uhttpd.ssl.tcp_keepalive='1'
> +  set uhttpd.ssl.config='/etc/httpd.conf'
> +  set uhttpd.px5g=cert
> +  set uhttpd.px5g.days='1400'
> +  set uhttpd.px5g.bits='2048'
> +  set uhttpd.px5g.commonname='OpenWrt'
> +EOF
> +
> +uci commit
> +exit 0
> -- 
> 2.8.3
> 

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 473 bytes
Beschreibung: This is a digitally signed message part
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20160609/a0db92a1/attachment-0001.sig>


Mehr Informationen über die Mailingliste franken-dev