From 49f427b8e412dbc1d830e814bfa61ef7f9ff9157 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Feb 2015 20:52:38 +0000 Subject: [PATCH] Moving to an independent default domain name --- doc/EN/installation.org | 4 +- man/freedombone.1.gz | Bin 3795 -> 3835 bytes src/freedombone | 73 +++++++++++++++-------------------- src/freedombone-config | 32 +++------------ website/EN/installation.html | 6 +-- 5 files changed, 43 insertions(+), 72 deletions(-) diff --git a/doc/EN/installation.org b/doc/EN/installation.org index 9ce66a73..ca69d61c 100644 --- a/doc/EN/installation.org +++ b/doc/EN/installation.org @@ -101,11 +101,11 @@ make install nano /home/myusername/freedombone/freedombone.cfg #+END_SRC -Add the following, and set the values as needed. Note that for a full install DOMAIN_NAME should be the same as the wiki domain name. +Add the following, and set the values as needed. DEFAULT_DOMAIN_NAME is where your email/xmpp/irc/voip will be accessed from. It could be the same as one of your other domains, or separate. #+BEGIN_SRC bash MY_USERNAME=myusername -DOMAIN_NAME=mywikidomain +DEFAULT_DOMAIN_NAME=mywikidomain SYSTEM_TYPE=full INSTALLING_ON_BBB=no DDNS_PROVIDER=default@freedns.afraid.org diff --git a/man/freedombone.1.gz b/man/freedombone.1.gz index 7e29221a64cd0e9fd223723e375470ecf4014c9f..6a988692c4452aff9f825b76dca49d141992b04e 100644 GIT binary patch literal 3835 zcmVfrbxMBhPvjD<5V_I@9!W4j_;3shP|JX7@HgMnp_PX9^@j5N+T6t7D)MRKBCx) zJZ{yDpvgtJ7R%BCcjbo{s@L?}kB>{CUtk!zuv36iftOLMG;rz6Z_#XdCuca zpz`Foq@R@^Uiymyy-E)Wq93;4ALBwHp7dgPT=J79xzB-u@vHPX&qRa1&%*?H zg}%!~iF{|%K!4!h%!bqXa56q>%~!nT_1t98io|9U;2;}`QY$zJ;TUS?q9dX5CR=mG zLCV`DM8iwnL}cMlq~HwF9Xu>rCBWis0`moQFnrX_3*=Dt>Oa5(67I2~Vq18=$dhG~ zf^Ns6oCgXgk^K=Eg!6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snVMbyi@AAR{%LfA#^)yQUxVq zZeI3izuz92L%LtGfC`gGsup58x|~$#x2am|r+xlvZw9xCrMYIu_#w&Z=Ps%>sQjP_ zz9W!r-|#8RBRl-A9vEdYE}n_pOpNNiH)d{+0P=K7zmWZ>*VrHH*#S_vfbbvy1F*Ivtz8ir>Wt<}Ui~;_2y0x#%MX zT~4xUxu~DHoW<7VhY#;AUK~4%`q@hVb%qT+5C40zXVLu5j?XXma$bBO&Wl#L*q_|g zZhL-y`SIPwOZ>{k+eFnDPg@t|V$VL(SL!=Hdw=ol;^X^^r{~|`yu7TGpx^VV#q-mT zCv>5r*ELm-f6y3LZZ5JC6xZuz`JPloKD@K)Pn`D{6JRzF_68XXWz) zy)MW|A#@C&moPXQulWi??;K0D51-@g6Z98 za)25jWcNZT;2rx*D8lbicnFn5(#xMcCH~s*!mKgA9Ut9}Z?9OdeR*-*JGszbJBeD+ zo7|jVvCe(-IC{(%tIo@pc$VEQ2I6niSgvoLKl5ZNvIj2xf#!PT;g!BH?pr^r@oy>* Jd-w_`007(?X+;14 diff --git a/src/freedombone b/src/freedombone index fb290272..da58217c 100755 --- a/src/freedombone +++ b/src/freedombone @@ -54,7 +54,7 @@ VARIANT_SOCIAL="social" VARIANT_MEDIA="media" VARIANT_TOR_DONGLE="tordongle" -DOMAIN_NAME= +DEFAULT_DOMAIN_NAME= MY_USERNAME= SYSTEM_TYPE=$VARIANT_FULL @@ -241,10 +241,10 @@ XMPP_CIPHERS='"EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+ XMPP_ECC_CURVE='"secp384r1"' # the default email address -MY_EMAIL_ADDRESS=$MY_USERNAME@$DOMAIN_NAME +MY_EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME # optionally specify your name to appear on the blog -MY_NAME=$DOMAIN_NAME +MY_NAME=$DEFAULT_DOMAIN_NAME export DEBIAN_FRONTEND=noninteractive @@ -512,7 +512,7 @@ else # default domain name -d|--domain) shift - DOMAIN_NAME="$1" + DEFAULT_DOMAIN_NAME="$1" ;; # The type of system -s|--system) @@ -632,7 +632,7 @@ function parse_args { echo "There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user." exit 1 fi - if [ ! "$DOMAIN_NAME" ]; then + if [ ! "$DEFAULT_DOMAIN_NAME" ]; then echo 'No default domain specified' show_help exit 2 @@ -706,7 +706,11 @@ function read_configuration { MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then - DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + # for backwards compatability + DEFAULT_DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi + if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then + DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi if grep -q "NAMESERVER1" $CONFIGURATION_FILE; then NAMESERVER1=$(grep "NAMESERVER1" $CONFIGURATION_FILE | awk -F '=' '{print $2}') @@ -4269,10 +4273,10 @@ function set_your_domain_name { if grep -Fxq "set_your_domain_name" $COMPLETION_FILE; then return fi - echo "$DOMAIN_NAME" > /etc/hostname - hostname $DOMAIN_NAME - sed -i "s/127.0.1.1 arm/127.0.1.1 $DOMAIN_NAME/g" /etc/hosts - echo "127.0.1.1 $DOMAIN_NAME" >> /etc/hosts + echo "$DEFAULT_DOMAIN_NAME" > /etc/hostname + hostname $DEFAULT_DOMAIN_NAME + sed -i "s/127.0.1.1 arm/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts + echo "127.0.1.1 $DEFAULT_DOMAIN_NAME" >> /etc/hosts echo 'set_your_domain_name' >> $COMPLETION_FILE } @@ -4727,7 +4731,7 @@ function configure_email { sed -i 's|pam_mail.so nopen|pam_mail.so dir=~/Maildir nopen|g' /etc/pam.d/su echo 'dc_eximconfig_configtype="internet"' > /etc/exim4/update-exim4.conf.conf - echo "dc_other_hostnames='$DOMAIN_NAME'" >> /etc/exim4/update-exim4.conf.conf + echo "dc_other_hostnames='$DEFAULT_DOMAIN_NAME'" >> /etc/exim4/update-exim4.conf.conf echo "dc_local_interfaces=''" >> /etc/exim4/update-exim4.conf.conf echo "dc_readhost=''" >> /etc/exim4/update-exim4.conf.conf echo "dc_relay_domains=''" >> /etc/exim4/update-exim4.conf.conf @@ -4755,7 +4759,7 @@ function configure_email { chmod 640 /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf.template - sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template + sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template sed -i "s|SMTPLISTENEROPTIONS=''|SMTPLISTENEROPTIONS='-oX 465:25:587 -oP /var/run/exim4/exim.pid'|g" /etc/default/exim4 if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf.template; then sed -i '/SSL configuration for exim/i\tls_on_connect_ports=465' /etc/exim4/exim4.conf.template @@ -5536,7 +5540,7 @@ function create_public_mailing_list { fi # does the mailing list have a separate domain name? if [ ! $PUBLIC_MAILING_LIST_DOMAIN_NAME ]; then - PUBLIC_MAILING_LIST_DOMAIN_NAME=$DOMAIN_NAME + PUBLIC_MAILING_LIST_DOMAIN_NAME=$DEFAULT_DOMAIN_NAME fi PUBLIC_MAILING_LIST_USER="mlmmj" @@ -5612,7 +5616,7 @@ function create_public_mailing_list { echo 'Public mailing list' >> /home/$MY_USERNAME/README echo '===================' >> /home/$MY_USERNAME/README echo "To subscribe to the $PUBLIC_MAILING_LIST mailing list send a" >> /home/$MY_USERNAME/README - echo "cleartext email to $PUBLIC_MAILING_LIST+subscribe@$DOMAIN_NAME" >> /home/$MY_USERNAME/README + echo "cleartext email to $PUBLIC_MAILING_LIST+subscribe@$DEFAULT_DOMAIN_NAME" >> /home/$MY_USERNAME/README fi addmailinglist $MY_USERNAME "$PUBLIC_MAILING_LIST" "$PUBLIC_MAILING_LIST" @@ -5651,8 +5655,8 @@ function create_private_mailing_list { ln -s /var/lib/gems/2.1.0/gems/schleuder-2.2.4 /var/lib/schleuder sed -i 's/#smtp_port: 25/smtp_port: 465/g' /etc/schleuder/schleuder.conf sed -i 's/#superadminaddr: root@localhost/superadminaddr: root@localhost' /etc/schleuder/schleuder.conf - schleuder-newlist $PRIVATE_MAILING_LIST@$DOMAIN_NAME -realname "$PRIVATE_MAILING_LIST" -adminaddress $MY_EMAIL_ADDRESS -initmember $MY_EMAIL_ADDRESS -initmemberkey $MY_GPG_PUBLIC_KEY -nointeractive - addemailtofolder $MY_USERNAME $PRIVATE_MAILING_LIST@$DOMAIN_NAME $PRIVATE_MAILING_LIST + schleuder-newlist $PRIVATE_MAILING_LIST@$DEFAULT_DOMAIN_NAME -realname "$PRIVATE_MAILING_LIST" -adminaddress $MY_EMAIL_ADDRESS -initmember $MY_EMAIL_ADDRESS -initmemberkey $MY_GPG_PUBLIC_KEY -nointeractive + addemailtofolder $MY_USERNAME $PRIVATE_MAILING_LIST@$DEFAULT_DOMAIN_NAME $PRIVATE_MAILING_LIST echo 'schleuder:' > /etc/exim4/conf.d/router/550_exim4-config_schleuder echo ' debug_print = "R: schleuder for $local_part@$domain"' >> /etc/exim4/conf.d/router/550_exim4-config_schleuder @@ -5677,7 +5681,7 @@ function create_private_mailing_list { useradd -d /var/schleuderlists -s /bin/false schleuder adduser Debian-exim schleuder usermod -a -G mail schleuder - #exim -d -bt $PRIVATE_MAILING_LIST@$DOMAIN_NAME + #exim -d -bt $PRIVATE_MAILING_LIST@$DEFAULT_DOMAIN_NAME echo 'create_private_mailing_list' >> $COMPLETION_FILE } @@ -6093,11 +6097,10 @@ function install_owncloud { fi # if this is exclusively a cloud setup if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then - if [ ! $DOMAIN_NAME ]; then + if [ ! $DEFAULT_DOMAIN_NAME ]; then echo 'No default domain name when installing cloud variant' exit 5380 fi - OWNCLOUD_DOMAIN_NAME=$DOMAIN_NAME fi if [ ! $OWNCLOUD_DOMAIN_NAME ]; then echo 'No Owncloud domain name was specified' @@ -6359,7 +6362,7 @@ function install_xmpp { sed -i "/certificate =/a\ curve = $XMPP_ECC_CURVE;" /etc/prosody/conf.avail/xmpp.cfg.lua fi - sed -i "s/example.com/$DOMAIN_NAME/g" /etc/prosody/conf.avail/xmpp.cfg.lua + sed -i "s/example.com/$DEFAULT_DOMAIN_NAME/g" /etc/prosody/conf.avail/xmpp.cfg.lua sed -i 's/enabled = false -- Remove this line to enable this host//g' /etc/prosody/conf.avail/xmpp.cfg.lua if ! grep -q "modules_enabled" /etc/prosody/conf.avail/xmpp.cfg.lua; then @@ -6405,14 +6408,14 @@ function install_xmpp { sed -i 's/enabled = false -- Remove this line to enable this host//g' /etc/prosody/prosody.cfg.lua sed -i 's|key = "/etc/prosody/certs/example.com.key"|key = "/etc/ssl/private/xmpp.key"|g' /etc/prosody/prosody.cfg.lua sed -i 's|certificate = "/etc/prosody/certs/example.com.crt"|certificate = "/etc/ssl/certs/xmpp.crt"|g' /etc/prosody/prosody.cfg.lua - sed -i "s/example.com/$DOMAIN_NAME/g" /etc/prosody/prosody.cfg.lua + sed -i "s/example.com/$DEFAULT_DOMAIN_NAME/g" /etc/prosody/prosody.cfg.lua service prosody restart touch /home/$MY_USERNAME/README if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then XMPP_PASSWORD=$(openssl rand -base64 8) - prosodyctl register $MY_USERNAME $DOMAIN_NAME $XMPP_PASSWORD + prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME $XMPP_PASSWORD echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README echo 'XMPP' >> /home/$MY_USERNAME/README @@ -6469,8 +6472,8 @@ function install_irc_server { echo '**************************************************' >> /etc/ngircd/motd sed -i 's|MotdFile = /etc/ngircd/ngircd.motd|MotdFile = /etc/ngircd/motd|g' /etc/ngircd/ngircd.conf sed -i "s/irc@irc.example.com/$MY_EMAIL_ADDRESS/g" /etc/ngircd/ngircd.conf - sed -i "s/irc.example.net/$DOMAIN_NAME/g" /etc/ngircd/ngircd.conf - sed -i "s|Yet another IRC Server running on Debian GNU/Linux|IRC Server of $DOMAIN_NAME|g" /etc/ngircd/ngircd.conf + sed -i "s/irc.example.net/$DEFAULT_DOMAIN_NAME/g" /etc/ngircd/ngircd.conf + sed -i "s|Yet another IRC Server running on Debian GNU/Linux|IRC Server of $DEFAULT_DOMAIN_NAME|g" /etc/ngircd/ngircd.conf sed -i 's/;Password = wealllikedebian/Password =/g' /etc/ngircd/ngircd.conf sed -i 's|;CertFile = /etc/ssl/certs/server.crt|CertFile = /etc/ssl/certs/ngircd.crt|g' /etc/ngircd/ngircd.conf sed -i 's|;DHFile = /etc/ngircd/dhparams.pem|DHFile = /etc/ssl/certs/ngircd.dhparam|g' /etc/ngircd/ngircd.conf @@ -6508,8 +6511,8 @@ function install_irc_server { echo '==========' >> /home/$MY_USERNAME/README echo 'To connect to your IRC server in irssi:' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README - echo " /server add -auto -ssl $DOMAIN_NAME 6697" >> /home/$MY_USERNAME/README - echo " /connect $DOMAIN_NAME" >> /home/$MY_USERNAME/README + echo " /server add -auto -ssl $DEFAULT_DOMAIN_NAME 6697" >> /home/$MY_USERNAME/README + echo " /connect $DEFAULT_DOMAIN_NAME" >> /home/$MY_USERNAME/README echo ' /join #freedombone' >> /home/$MY_USERNAME/README fi @@ -6531,10 +6534,6 @@ function install_wiki { if grep -Fxq "install_wiki" $COMPLETION_FILE; then return fi - # if everything is being installed or if this is exclusively a writer setup - if [[ $SYSTEM_TYPE == "$VARIANT_FULL" || $SYSTEM_TYPE == "$VARIANT_WRITER" ]]; then - WIKI_DOMAIN_NAME=$DOMAIN_NAME - fi if [ ! $WIKI_DOMAIN_NAME ]; then return fi @@ -7302,10 +7301,6 @@ function install_redmatrix { if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then return fi - # if this is exclusively a social setup - if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" ]]; then - REDMATRIX_DOMAIN_NAME=$DOMAIN_NAME - fi if [ ! $REDMATRIX_DOMAIN_NAME ]; then return fi @@ -7662,10 +7657,6 @@ function install_mediagoblin { if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then return fi - # if this is exclusively a writer setup - if [[ $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then - MEDIAGOBLIN_DOMAIN_NAME=$DOMAIN_NAME - fi if [ ! $MEDIAGOBLIN_DOMAIN_NAME ]; then return fi @@ -7909,7 +7900,7 @@ function intrusion_detection { apt-get -y install tripwire apt-get -y autoremove cd /etc/tripwire - cp site.key $DOMAIN_NAME-site.key + cp site.key $DEFAULT_DOMAIN_NAME-site.key echo '' echo '' echo '*** Installing intrusion detection. Press Enter when asked for the local and site passphrases. ***' @@ -8119,7 +8110,7 @@ function create_git_project { echo '' >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND echo -n 'echo "Your project has been created, ' >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND echo 'use the following command to clone the repository"' >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND - echo -n " git clone ssh://$MY_USERNAME@$DOMAIN_NAME:$SSH_PORT" >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND + echo -n " git clone ssh://$MY_USERNAME@$DEFAULT_DOMAIN_NAME:$SSH_PORT" >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND echo '/home/$USER/projects/$GIT_PROJECT_NAME' >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND echo '' >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND echo 'exit 0' >> /usr/bin/$CREATE_GIT_PROJECT_COMMAND @@ -8380,7 +8371,7 @@ function install_voip { exit 57893 fi - sed -i "s|welcometext=.*|welcometext=\"
Welcome to $DOMAIN_NAME VoIP.
Chat freely!
\"|g" /etc/mumble-server.ini + sed -i "s|welcometext=.*|welcometext=\"
Welcome to $DEFAULT_DOMAIN_NAME VoIP.
Chat freely!
\"|g" /etc/mumble-server.ini if [ $VOIP_SERVER_PASSWORD ]; then sed -i "s|serverpassword=.*|serverpassword=$VOIP_SERVER_PASSWORD|g" /etc/mumble-server.ini diff --git a/src/freedombone-config b/src/freedombone-config index 89ddda50..0336fd50 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -53,7 +53,7 @@ VARIANT_MEDIA="media" VARIANT_TOR_DONGLE="tordongle" MY_USERNAME= -DOMAIN_NAME= +DEFAULT_DOMAIN_NAME= MY_EMAIL_ADDRESS= SYSTEM_TYPE= INSTALLING_ON_BBB= @@ -135,7 +135,7 @@ function save_configuration_file { fi echo "MY_USERNAME=$MY_USERNAME" > $CONFIGURATION_FILE - echo "DOMAIN_NAME=$DOMAIN_NAME" >> $CONFIGURATION_FILE + echo "DEFAULT_DOMAIN_NAME=$DEFAULT_DOMAIN_NAME" >> $CONFIGURATION_FILE echo "SYSTEM_TYPE=$SYSTEM_TYPE" >> $CONFIGURATION_FILE echo "INSTALLING_ON_BBB=$INSTALLING_ON_BBB" >> $CONFIGURATION_FILE echo "DDNS_PROVIDER=$DDNS_PROVIDER" >> $CONFIGURATION_FILE @@ -610,10 +610,6 @@ function interactive_configuration { if [[ $TEST_DOMAIN_NAME != $WIKI_DOMAIN_NAME ]]; then WIKI_DOMAIN_NAME= dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 - else - if [ ! $DOMAIN_NAME ]; then - DOMAIN_NAME=$WIKI_DOMAIN_NAME - fi fi fi done @@ -647,10 +643,6 @@ function interactive_configuration { if [[ $TEST_DOMAIN_NAME != $FULLBLOG_DOMAIN_NAME ]]; then FULLBLOG_DOMAIN_NAME= dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 - else - if [ ! $DOMAIN_NAME ]; then - DOMAIN_NAME=$FULLBLOG_DOMAIN_NAME - fi fi fi done @@ -679,10 +671,6 @@ function interactive_configuration { if [[ $TEST_DOMAIN_NAME != $OWNCLOUD_DOMAIN_NAME ]]; then OWNCLOUD_DOMAIN_NAME= dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 - else - if [ ! $DOMAIN_NAME ]; then - DOMAIN_NAME=$OWNCLOUD_DOMAIN_NAME - fi fi fi done @@ -711,10 +699,6 @@ function interactive_configuration { if [[ $TEST_DOMAIN_NAME != $REDMATRIX_DOMAIN_NAME ]]; then REDMATRIX_DOMAIN_NAME= dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 - else - if [ ! $DOMAIN_NAME ]; then - DOMAIN_NAME=$REDMATRIX_DOMAIN_NAME - fi fi fi done @@ -746,26 +730,22 @@ function interactive_configuration { if [[ $TEST_DOMAIN_NAME != $MICROBLOG_DOMAIN_NAME ]]; then MICROBLOG_DOMAIN_NAME= dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 - else - if [ ! $DOMAIN_NAME ]; then - DOMAIN_NAME=$MICROBLOG_DOMAIN_NAME - fi fi fi done save_configuration_file fi - if [ ! $DOMAIN_NAME ]; then - while [ ! $DOMAIN_NAME ] + if [ ! $DEFAULT_DOMAIN_NAME ]; then + while [ ! $DEFAULT_DOMAIN_NAME ] do data=$(tempfile 2>/dev/null) trap "rm -f $data" 0 1 2 5 15 dialog --backtitle "Freedombone Configuration" \ - --inputbox "Domain name" 10 30 "$(grep 'DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data + --inputbox "Domain name" 10 30 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data sel=$? case $sel in - 0) DOMAIN_NAME=$(cat $data);; + 0) DEFAULT_DOMAIN_NAME=$(cat $data);; 1) exit 0;; 255) exit 0;; esac diff --git a/website/EN/installation.html b/website/EN/installation.html index badd2382..04add14e 100644 --- a/website/EN/installation.html +++ b/website/EN/installation.html @@ -4,7 +4,7 @@ - + @@ -359,13 +359,13 @@ nano /home/myusername/freedombone/freedombone.cfg

-Add the following, and set the values as needed. Note that for a full install DOMAIN_NAME should be the same as the wiki domain name. +Add the following, and set the values as needed. DEFAULT_DOMAIN_NAME is where your email/xmpp/irc/voip will be accessed from. It could be the same as one of your other domains, or separate.

MY_USERNAME=myusername
-DOMAIN_NAME=mywikidomain
+DEFAULT_DOMAIN_NAME=mywikidomain
 SYSTEM_TYPE=full
 INSTALLING_ON_BBB=no
 DDNS_PROVIDER=default@freedns.afraid.org