Fix gnusocial for onion-only installs

This commit is contained in:
Bob Mottram 2016-02-23 10:30:45 +00:00
parent 8674f63771
commit fa194ce56d
1 changed files with 10 additions and 5 deletions

View File

@ -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=$'<h1>Welcome to $MICROBLOG_DOMAIN_NAME a federated microblog</h1><p>Another Freedombone site</p>'
MICROBLOG_WELCOME_MESSAGE=$'<h1>Welcome to GNU Social a federated microblog</h1><p>Another Freedombone site</p>'
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