Browse Source

Don't need separate irc configurations

Bob Mottram 9 years ago
parent
commit
856d1f22a1
1 changed files with 2 additions and 48 deletions
  1. 2
    48
      src/freedombone-controlpanel

+ 2
- 48
src/freedombone-controlpanel View File

741
     esac
741
     esac
742
 }
742
 }
743
 
743
 
744
-function irc_via_onion {
745
-    if [ ! -f /lib/systemd/system/ngircd.service ]; then
746
-        dialog --title $"IRC Server" \
747
-               --msgbox $"ngircd systemd daemon not found" 8 50
748
-        return
749
-    fi
750
-    
751
-    dialog --title $"IRC Server" \
752
-           --backtitle $"Freedombone Control Panel" \
753
-           --defaultno \
754
-           --yesno $"\nAccess the IRC server via an onion address?" 8 60
755
-    sel=$?
756
-    irc_onion='no'
757
-    case $sel in
758
-        0) irc_onion='yes';;
759
-        255) return;;
760
-    esac
761
-    if [[ $irc_onion == 'no' ]]; then
762
-        if grep -q ";Ports = 6667" /etc/ngircd/ngircd.conf; then
763
-            sed -i "s/;Ports =.*/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
764
-        else
765
-            if ! grep -q ";Ports = $IRC_PORT, $IRC_ONION_PORT" /etc/ngircd/ngircd.conf; then
766
-                sed -i "s/Ports = $IRC_PORT, $IRC_ONION_PORT/;Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
767
-            fi
768
-        fi
769
-        systemctl stop ngircd
770
-        sed -i 's|ExecStart.*|ExecStart=/usr/sbin/ngircd|g' /lib/systemd/system/ngircd.service
771
-        systemctl daemon-reload
772
-        systemctl start ngircd
773
-        dialog --title $"IRC Server" \
774
-               --msgbox $"The IRC server can now be accessed via SSL at your main domain name" 8 50
775
-    else
776
-        if grep -q ";Ports = $IRC_PORT, $IRC_ONION_PORT" /etc/ngircd/ngircd.conf; then
777
-            sed -i "s/;Ports =.*/Ports = $IRC_PORT, $IRC_ONION_PORT/1" /etc/ngircd/ngircd.conf
778
-            systemctl stop ngircd
779
-            sed -i 's|ExecStart.*|ExecStart=/usr/bin/torify /usr/sbin/ngircd|g' /lib/systemd/system/ngircd.service
780
-            systemctl daemon-reload
781
-            systemctl start ngircd
782
-        fi
783
-        dialog --title $"IRC Server" \
784
-               --msgbox $"The IRC server can now be accessed via its onion address without SSL" 8 50
785
-    fi
786
-}
787
-
788
 function remove_user_from_mailing_list {
744
 function remove_user_from_mailing_list {
789
     select_user
745
     select_user
790
     if [ ! $SELECTED_USERNAME ]; then
746
     if [ ! $SELECTED_USERNAME ]; then
1859
                --radiolist $"Choose an operation:" 14 70 4 \
1815
                --radiolist $"Choose an operation:" 14 70 4 \
1860
                1 $"Set a password for all IRC users" off \
1816
                1 $"Set a password for all IRC users" off \
1861
                2 $"Show current IRC login password" off \
1817
                2 $"Show current IRC login password" off \
1862
-               3 $"Access via the onion address" off \
1863
-               4 $"Exit" on 2> $data
1818
+               3 $"Exit" on 2> $data
1864
         sel=$?
1819
         sel=$?
1865
         case $sel in
1820
         case $sel in
1866
             1) break;;
1821
             1) break;;
1869
         case $(cat $data) in
1824
         case $(cat $data) in
1870
             1) irc_set_global_password;;
1825
             1) irc_set_global_password;;
1871
             2) irc_show_password;;
1826
             2) irc_show_password;;
1872
-            3) irc_via_onion;;
1873
-            4) break;;
1827
+            3) break;;
1874
         esac
1828
         esac
1875
     done
1829
     done
1876
 }
1830
 }