chiark / gitweb /
scripts/setup no longer asks for smtp server
authorRichard Kettlewell <richard@heceptor.anjou.terraraq.org.uk>
Mon, 2 Jun 2008 21:09:00 +0000 (22:09 +0100)
committerRichard Kettlewell <richard@heceptor.anjou.terraraq.org.uk>
Mon, 2 Jun 2008 21:09:00 +0000 (22:09 +0100)
scripts/setup.in

index 541949ecb6c9cc7a6a9a0a91d5d001f78ed96692..3a0c66b801743720de5251e1aa2a04efa9d1a9e5 100755 (executable)
@@ -237,12 +237,6 @@ if [ "x$play" = xnetwork ]; then
   fi
 fi
 
-if [ -z "$smtp_server" ]; then
-  echo
-  echo "What host should DisOrder use as an SMTP server?"
-  read -r smtp_server
-fi
-
 if [ -z "$mail_sender" ]; then
   while :; do
     echo
@@ -264,7 +258,7 @@ if [ -z "$register" ]; then
     echo
     echo "Do you want to enable online registration?  (Enter 'y' or 'n')"
     read -r register
-    case $reguser in
+    case $register in
     y | n )
       break
       ;;
@@ -280,7 +274,9 @@ if [ $port = none ]; then
 else
   echo " TCP port to listen on: $port"
 fi
-echo " SMTP Server:           $smtp_server"
+if [ ! -z "$smtp_server" ]; then
+  echo " SMTP Server:           $smtp_server"
+fi
 echo " Sender address:        $mail_sender"
 echo " Online registration:   $register"
 if [ $play = network ]; then
@@ -315,7 +311,9 @@ fi
 if [ $play = network ]; then
   echo "broadcast $mcast_address $mcast_port" >> pkgconfdir/config.new
 fi
-echo "smtp_server $smtp_server" >> pkgconfdir/config.new
+if [ ! -z "$smtp_server" ]; then
+  echo "smtp_server $smtp_server" >> pkgconfdir/config.new
+fi
 echo "mail_sender $mail_sender" >> pkgconfdir/config.new
 
 echo