Ver código fonte

Displaying email hostnames

Bob Mottram 8 anos atrás
pai
commit
a6a911871b
1 arquivos alterados com 16 adições e 14 exclusões
  1. 16
    14
      src/freedombone-controlpanel

+ 16
- 14
src/freedombone-controlpanel Ver arquivo

1529
     trap "rm -f $data" 0 1 2 5 15
1529
     trap "rm -f $data" 0 1 2 5 15
1530
     dialog --title $"Email Domains" \
1530
     dialog --title $"Email Domains" \
1531
            --backtitle $"Freedombone Control Panel" \
1531
            --backtitle $"Freedombone Control Panel" \
1532
-           --inputbox $"Enter the list of email domains to use, separated by semicolons" 8 60 2>$data
1532
+           --inputbox $"Enter the list of email domains to use, separated by semicolons" 8 60 $email_hostnames 2>$data
1533
     sel=$?
1533
     sel=$?
1534
     case $sel in
1534
     case $sel in
1535
         0)
1535
         0)
1536
             emailhostnames=$(<$data)
1536
             emailhostnames=$(<$data)
1537
             if [ ${#emailhostnames} -gt 2 ]; then
1537
             if [ ${#emailhostnames} -gt 2 ]; then
1538
-                if [[ "$emailhostnames" == *"."* ]]; then
1539
-                    if [[ "$emailhostnames" != *" "* ]]; then
1540
-                        sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames'|g" /etc/exim4/update-exim4.conf.conf
1541
-                        update-exim4.conf
1542
-                        dpkg-reconfigure --frontend noninteractive exim4-config
1543
-                        systemctl restart saslauthd
1544
-                        dialog --title $"Email Domains" \
1545
-                               --backtitle $"Freedombone Control Panel" \
1546
-                               --msgbox $"Email domains were changed" 6 50
1547
-                    else
1548
-                        dialog --title $"Email Domains not set" \
1549
-                               --backtitle $"Freedombone Control Panel" \
1550
-                               --msgbox $"There should be no spaces in the list" 6 50
1538
+                if [[ "$email_hostnames" != "$emailhostnames" ]]; then
1539
+                    if [[ "$emailhostnames" == *"."* ]]; then
1540
+                        if [[ "$emailhostnames" != *" "* ]]; then
1541
+                            sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames'|g" /etc/exim4/update-exim4.conf.conf
1542
+                            update-exim4.conf
1543
+                            dpkg-reconfigure --frontend noninteractive exim4-config
1544
+                            systemctl restart saslauthd
1545
+                            dialog --title $"Email Domains" \
1546
+                                   --backtitle $"Freedombone Control Panel" \
1547
+                                   --msgbox $"Email domains were changed" 6 50
1548
+                        else
1549
+                            dialog --title $"Email Domains not set" \
1550
+                                   --backtitle $"Freedombone Control Panel" \
1551
+                                   --msgbox $"There should be no spaces in the list" 6 50
1552
+                        fi
1551
                     fi
1553
                     fi
1552
                 fi
1554
                 fi
1553
             fi
1555
             fi