meshwizard: use different port (9091) for ipv6 jsoninfo
authorManuel Munz <munz@comuno.net>
Sat, 30 May 2015 18:45:17 +0000 (20:45 +0200)
committerManuel Munz <munz@comuno.net>
Sat, 30 May 2015 18:45:17 +0000 (20:45 +0200)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh

index 9d18a582acc670367399449f4f71e93e77f25da7..f51b75e6ac3279fe25e0d4efee9d6f77cafd2113 100755 (executable)
@@ -115,12 +115,16 @@ setup_watchdog() {
 }
 
 setup_jsoninfo() {
-    # Setup jsoninfo
+       # Setup jsoninfo
+       proto="$1"
        uci batch <<- EOF
                set $cfg.olsrd_jsoninfo=LoadPlugin
                set $cfg.olsrd_jsoninfo.library="olsrd_jsoninfo.so.0.0"
        EOF
-    uci_commitverbose "Setup olsr jsoninfo plugin" $cfg
+       if [ "$proto" = "6" ]; then
+               uci set $cfg.olsrd_jsoninfo.port='9091'
+       fi
+       uci_commitverbose "Setup olsr jsoninfo plugin" $cfg
 }
 
 
@@ -140,6 +144,6 @@ for proto in $protocols; do
     setup_nameservice
     setup_dyngw_plain
     setup_watchdog
-    setup_jsoninfo
+    setup_jsoninfo $proto
 
 done