瀏覽代碼

Displaying email hostnames

Bob Mottram 8 年之前
父節點
當前提交
a6a911871b
共有 1 個文件被更改,包括 16 次插入14 次删除
  1. 16
    14
      src/freedombone-controlpanel

+ 16
- 14
src/freedombone-controlpanel 查看文件

@@ -1529,25 +1529,27 @@ function email_extra_domains {
1529 1529
     trap "rm -f $data" 0 1 2 5 15
1530 1530
     dialog --title $"Email Domains" \
1531 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 1533
     sel=$?
1534 1534
     case $sel in
1535 1535
         0)
1536 1536
             emailhostnames=$(<$data)
1537 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 1553
                     fi
1552 1554
                 fi
1553 1555
             fi