From fa194ce56dff30e895d5e37a4dabf78fad3c2553 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Feb 2016 10:30:45 +0000 Subject: [PATCH] Fix gnusocial for onion-only installs --- src/freedombone | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/freedombone b/src/freedombone index 5a402bde..46d9b981 100755 --- a/src/freedombone +++ b/src/freedombone @@ -200,7 +200,7 @@ MICROBLOG_COMMIT='f10625f8bc59e3ae52da07fdba910329fad540a3' MICROBLOG_ADMIN_PASSWORD= MICROBLOG_THEME_REPO="https://git.gnu.io/h2p/Qvitter.git" MICROBLOG_THEME_COMMIT='2816507545bb7e3da5b0a290692576b8d2ee335f' -MICROBLOG_WELCOME_MESSAGE=$'

Welcome to $MICROBLOG_DOMAIN_NAME – a federated microblog

Another Freedombone site

' +MICROBLOG_WELCOME_MESSAGE=$'

Welcome to GNU Social – a federated microblog

Another Freedombone site

' MICROBLOG_BACKGROUND_IMAGE_URL= MICROBLOG_MARKDOWN_REPO="https://github.com/chimo/gs-markdown" MICROBLOG_MARKDOWN_COMMIT='184801fba1418548045242f4a55d55c29f6a06da' @@ -8724,17 +8724,24 @@ function install_gnu_social { gnu_social_ssl='never' fi + MICROBLOG_ONION_HOSTNAME=$(add_onion_service microblog 80 ${MICROBLOG_ONION_PORT}) + + MICROBLOG_SERVER=${MICROBLOG_DOMAIN_NAME} + if [[ $ONION_ONLY != 'no' ]]; then + MICROBLOG_SERVER=${MICROBLOG_ONION_HOSTNAME} + fi + # Create the configuration gnu_social_installer=/var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/scripts/install_cli.php if [ ! -f $gnu_social_installer ]; then echo $'No GNU Social commandline installer found' exit 53026 fi - ${gnu_social_installer} --server "${MICROBLOG_DOMAIN_NAME}" \ + ${gnu_social_installer} --server "${MICROBLOG_SERVER}" \ --host="localhost" --database="gnusocial" \ --dbtype=mysql --username="root" -v \ --password="$MARIADB_PASSWORD" \ - --sitename="${MICROBLOG_DOMAIN_NAME}" --fancy='yes' \ + --sitename=$"GNU Social" --fancy='yes' \ --admin-nick="$MY_USERNAME" \ --admin-pass="$MICROBLOG_ADMIN_PASSWORD" \ --site-profile="community" \ @@ -8769,8 +8776,6 @@ function install_gnu_social { # This improves performance sed -i "s|//\$config\['db'\]\['schemacheck'\].*|\$config\['db'\]\['schemacheck'\] = 'script';|g" $microblog_config_file - MICROBLOG_ONION_HOSTNAME=$(add_onion_service microblog 80 ${MICROBLOG_ONION_PORT}) - systemctl restart php5-fpm systemctl restart nginx