From 08d95603bc5b5e173aaea383e5f8a0f71a11eca4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 1 Apr 2016 22:32:58 +0100 Subject: [PATCH] Disable mediagoblin, still won't install --- src/freedombone | 2 +- src/freedombone-config | 102 +++++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/src/freedombone b/src/freedombone index 1ff51789..876534c4 100755 --- a/src/freedombone +++ b/src/freedombone @@ -10852,7 +10852,7 @@ install_hubzilla #install_search_engine install_dlna_server configure_firewall_for_dlna -install_mediagoblin +#install_mediagoblin #install_ipfs repair_databases_script backup_to_friends_servers diff --git a/src/freedombone-config b/src/freedombone-config index 82692a6d..cbf9c6e0 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -91,6 +91,7 @@ FULLBLOG_DOMAIN_NAME= FULLBLOG_CODE= OWNCLOUD_DOMAIN_NAME= OWNCLOUD_CODE= +MEDIAGOBLIN_ENABLED='no' MEDIAGOBLIN_DOMAIN_NAME= MEDIAGOBLIN_CODE= HUBZILLA_DOMAIN_NAME= @@ -1661,62 +1662,65 @@ function interactive_configuration { save_configuration_file fi - if [[ $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then - if [[ $ONION_ONLY != "no" ]]; then - MEDIAGOBLIN_DOMAIN_NAME='media.local' - else - MEDIAGOBLIN_DETAILS_COMPLETE= - while [ ! $MEDIAGOBLIN_DETAILS_COMPLETE ] - do - data=$(tempfile 2>/dev/null) - trap "rm -f $data" 0 1 2 5 15 - if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then - dialog --backtitle $"Freedombone Configuration" \ - --title $"Mediagoblin Configuration" \ - --form $"\nPlease enter your Mediagoblin details, or just select Ok if you don't need a Mediagoblin site:" 11 55 2 \ - $"Domain:" 1 1 "$(grep 'MEDIAGOBLIN_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \ - $"Code:" 2 1 "$(grep 'MEDIAGOBLIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 33 255 \ - 2> $data - else - dialog --backtitle $"Freedombone Configuration" \ - --title $"Mediagoblin Configuration" \ - --form $"\nPlease enter your Mediagoblin details, or just select Ok if you don't need a Mediagoblin site:" 11 55 2 \ - $"Domain:" 1 1 "$(grep 'MEDIAGOBLIN_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \ - 2> $data - fi - sel=$? - case $sel in - 1) exit 1;; - 255) exit 1;; - esac - MEDIAGOBLIN_DOMAIN_NAME=$(cat $data | sed -n 1p) - if [ $MEDIAGOBLIN_DOMAIN_NAME ]; then - TEST_DOMAIN_NAME=$MEDIAGOBLIN_DOMAIN_NAME - validate_domain_name - if [[ $TEST_DOMAIN_NAME != $MEDIAGOBLIN_DOMAIN_NAME ]]; then - MEDIAGOBLIN_DOMAIN_NAME='invalid' - dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 + if [[ $MEDIAGOBLIN_ENABLED == 'yes' ]]; then + if [[ $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then + if [[ $ONION_ONLY != "no" ]]; then + MEDIAGOBLIN_DOMAIN_NAME='media.local' + else + MEDIAGOBLIN_DETAILS_COMPLETE= + while [ ! $MEDIAGOBLIN_DETAILS_COMPLETE ] + do + data=$(tempfile 2>/dev/null) + trap "rm -f $data" 0 1 2 5 15 + if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then + dialog --backtitle $"Freedombone Configuration" \ + --title $"Mediagoblin Configuration" \ + --form $"\nPlease enter your Mediagoblin details, or just select Ok if you don't need a Mediagoblin site:" 11 55 2 \ + $"Domain:" 1 1 "$(grep 'MEDIAGOBLIN_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \ + $"Code:" 2 1 "$(grep 'MEDIAGOBLIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 33 255 \ + 2> $data else - if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then - MEDIAGOBLIN_CODE=$(cat $data | sed -n 2p) - validate_freedns_code "$MEDIAGOBLIN_CODE" - if [ ! $VALID_CODE ]; then - MEDIAGOBLIN_DOMAIN_NAME='invalid' + dialog --backtitle $"Freedombone Configuration" \ + --title $"Mediagoblin Configuration" \ + --form $"\nPlease enter your Mediagoblin details, or just select Ok if you don't need a Mediagoblin site:" 11 55 2 \ + $"Domain:" 1 1 "$(grep 'MEDIAGOBLIN_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 33 40 \ + 2> $data + fi + sel=$? + case $sel in + 1) exit 1;; + 255) exit 1;; + esac + MEDIAGOBLIN_DOMAIN_NAME=$(cat $data | sed -n 1p) + if [ $MEDIAGOBLIN_DOMAIN_NAME ]; then + TEST_DOMAIN_NAME=$MEDIAGOBLIN_DOMAIN_NAME + validate_domain_name + if [[ $TEST_DOMAIN_NAME != $MEDIAGOBLIN_DOMAIN_NAME ]]; then + MEDIAGOBLIN_DOMAIN_NAME='invalid' + dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50 + else + if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then + MEDIAGOBLIN_CODE=$(cat $data | sed -n 2p) + validate_freedns_code "$MEDIAGOBLIN_CODE" + if [ ! $VALID_CODE ]; then + MEDIAGOBLIN_DOMAIN_NAME='invalid' + fi fi fi fi - fi - if [ $MEDIAGOBLIN_DOMAIN_NAME ]; then - if [[ $MEDIAGOBLIN_DOMAIN_NAME == 'invalid' ]]; then - MEDIAGOBLIN_DOMAIN_NAME= - else - MEDIAGOBLIN_DETAILS_COMPLETE="yes" + if [ $MEDIAGOBLIN_DOMAIN_NAME ]; then + if [[ $MEDIAGOBLIN_DOMAIN_NAME == 'invalid' ]]; then + MEDIAGOBLIN_DOMAIN_NAME= + else + MEDIAGOBLIN_DETAILS_COMPLETE="yes" + fi fi - fi - done + done + fi + save_configuration_file fi - save_configuration_file fi + if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then if [[ $ONION_ONLY != "no" ]]; then