From 6b75ac27ac139673925d2782cdab750dd08cfcc3 Mon Sep 17 00:00:00 2001 From: Markus Rippl Date: Fri, 15 Jul 2016 22:53:25 +0200 Subject: [PATCH] add script to generate site confs fixes #34 --- extra/make_siteconfs.sh | 10 ++++++++++ extra/stadtteile_idx.txt | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100755 extra/make_siteconfs.sh create mode 100644 extra/stadtteile_idx.txt diff --git a/extra/make_siteconfs.sh b/extra/make_siteconfs.sh new file mode 100755 index 0000000..bf57d1e --- /dev/null +++ b/extra/make_siteconfs.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +[ -e new ] || mkdir new + +cat stadtteile_idx.txt|grep -e '^[^#]'|grep -v LK_|while IFS=, read nr id desc port; do cp ffmuc.conf new/ffmuc_$id.conf; done +cat stadtteile_idx.txt|grep -e '^[^#]'|grep LK_|while IFS=, read nr id desc port; do cp ffmuc_umland.conf new/ffmuc_$id.conf; done + +cat stadtteile_idx.txt|grep -e '^[^#]'|while IFS=, read nr id desc seg_id port; do ( echo "# processing ffmuc_$id.conf"; cat new/ffmuc_$id.conf |sed -e "s/port 100[01][0-9]/port $port/" |sed -e "s/.*site_code.*/ site_code = 'ffmuc_$id',/g"|sed -e "s/.*site_name.*/ site_name = 'Freifunk München - $desc',/g" > new/ffmuc_$id.conf.new; mv new/ffmuc_$id.conf.new new/ffmuc_$id.conf); done + + diff --git a/extra/stadtteile_idx.txt b/extra/stadtteile_idx.txt new file mode 100644 index 0000000..8ab46ec --- /dev/null +++ b/extra/stadtteile_idx.txt @@ -0,0 +1,35 @@ +#idx,id,description,segment_id,port +1,M_Altstadt,Altstadt-Lehel,0,10021 +2,M_Ludwigsvorstadt,Ludwigsvorstadt-Isarvorstadt,0,10022 +3,M_Maxvorstadt,Maxvorstadt,0,10023 +4,M_Schwabing_West,Schwabing-West,0,10024 +5,M_Au,Au-Haidhausen,0,10025 +6,M_Sendling,Sendling,0,10026 +7,M_Sendl_Westpark,Sendling-Westpark,0,10027 +8,M_Schwanthalerhoehe,Schwanthalerhöhe,0,10028 +9,M_Neuhausen,Neuhausen-Nymphenburg,0,10029 +10,M_Moosach,Moosach,0,10030 +11,M_Milbertshofen,Milbertshofen-Am-Hart,0,10031 +12,M_Schwabing_Freimann,Schwabing-Freimann,0,10032 +13,M_Bogenhausen,Bogenhausen,0,10033 +14,M_BergAmLaim,Berg am Laim,0,10034 +15,M_Trudering,Trudering-Riem,0,10035 +16,M_Ramersdorf,Ramersdorf-Perlach,0,10036 +17,M_Obergiesing,Obergiesing-Fasangarten,0,10037 +18,M_Untergiesing,Untergiesing-Harlaching,0,10038 +19,M_Thalkirchen,Thalkirchen-Obersendling-Forstenried-Fürstenried-Solln,0,10039 +20,M_Hadern,Hadern,0,10040 +21,M_Pasing,Pasing-Obermenzing,0,10041 +22,M_Aubing,Aubing-Lochhausen-Langwied,0,10042 +23,M_Allach,Allach-Untermenzing,0,10043 +24,M_Feldmoching,Feldmoching-Hasenbergl,0,10044 +25,M_Laim,Laim,0,10045 +26,LK_M_Land,München-Land,1,10046 +27,LK_STA,Landkreis Starnberg (STA),1,10047 +28,LK_FFB,Landkreis Fürstenfeldbruck (FFB),1,10048 +29,LK_DAH,Landkreis Dachau (DAH),1,10049 +30,LK_FS,Landkreis Freising (FS),1,10050 +31,LK_ED,Landkreis Erding (ED),1,10061 +32,LK_EBE,Landkreis Ebersberg (EBE),1,10062 +33,LK_TOEL,Landkreis Bad Tölz-Wolfratshausen (TÖL),1,10063 +34,LK_Outback,Alle weiteren Landkreise,1,10064