Browse Source

debconf updated - disable also listening on multicast ip if no listen ip is entered

Pavel Kasparek 17 years ago
parent
commit
f22cb6ac64
3 changed files with 12 additions and 0 deletions
  1. 5 0
      etc/ser-oob.cfg
  2. 3 0
      pkg/debian/ser-oob.config
  3. 4 0
      pkg/debian/ser-oob.postinst

+ 5 - 0
etc/ser-oob.cfg

@@ -142,12 +142,17 @@ disable_tcp=no
 phone2tel=no
 
 reply_to_via=no
+
 # public IP address
 #DEBCONF-LISTEN-START
 listen=127.0.0.1
 #DEBCONF-LISTEN-END
+
 # sip.mcast.net for REGISTER replication
+#DEBCONF-LISTEN_REPL-START
 listen=224.0.1.75
+#DEBCONF-LISTEN_REPL-END
+
 # administrative interface -- needed for example for multicast source
 # or XML-RPC
 #DEBCONF-LISTEN_ADMIN-START

+ 3 - 0
pkg/debian/ser-oob.config

@@ -29,6 +29,9 @@ if [ "$RET" != "" ]; then
   db_go
   db_input medium ser-oob/SENDADDR || true
   db_go
+else
+  # set admin addr to empty
+  db_set ser-oob/ADMINADDR
 fi
 
 db_input medium ser-oob/DBURL || true

+ 4 - 0
pkg/debian/ser-oob.postinst

@@ -139,11 +139,15 @@ if test "$RET" != "!" ; then
     # enable the replication block
     echo "#" | fn_config_replace $CONFIGFILE REPLICATION1
     echo "#" | fn_config_replace $CONFIGFILE REPLICATION2
+    # enable replication listen addr
+    echo "listen=224.0.1.75" | fn_config_replace $CONFIGFILE LISTEN_REPL
   else
     echo "#listen=127.0.0.1" | fn_config_replace $CONFIGFILE LISTEN
     # comment out the replication block
     echo "/*" | fn_config_replace $CONFIGFILE REPLICATION1
     echo "*/" | fn_config_replace $CONFIGFILE REPLICATION2
+    # disable replication listen addr
+    echo "#listen=224.0.1.75" | fn_config_replace $CONFIGFILE LISTEN_REPL
   fi
 fi