diff --git a/src/freedombone b/src/freedombone index 0c973933..4caf4c4c 100755 --- a/src/freedombone +++ b/src/freedombone @@ -199,6 +199,7 @@ MICROBLOG_ADMIN_PASSWORD= GNUSOCIAL_COMMIT='94392ab00ceefec6105ac7d6e6846fb644bbd0f1' MICROBLOG_THEME_REPO="https://git.gnu.io/h2p/Qvitter.git" MICROBLOG_THEME_COMMIT='8abbdeb3c0a6a34754411452ae832d2f19cef7ab' +MICROBLOG_WELCOME_MESSAGE=$"

Welcome to ${MICROBLOG_DOMAIN_NAME} – a federated microblog

Another Freedombone site

" # Domain name for hubzilla installation HUBZILLA_DOMAIN_NAME= @@ -1022,6 +1023,9 @@ function read_configuration { if [[ $CONFIGURATION_FILE != "/root/${PROJECT_NAME}.cfg" ]]; then cp $CONFIGURATION_FILE /root/${PROJECT_NAME}.cfg fi + if grep -q "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE; then + MICROBLOG_WELCOME_MESSAGE=$(grep "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + fi if grep -q "PROJECT_WEBSITE" $CONFIGURATION_FILE; then PROJECT_WEBSITE=$(grep "PROJECT_WEBSITE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi @@ -8541,6 +8545,17 @@ function install_gnu_social { exit 72357 fi + if ! grep -q "Recommended GNU social settings" $microblog_config_file; then + microblog_config_file=/var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php + echo "" >> $microblog_config_file + echo "// Recommended GNU social settings" >> $microblog_config_file + echo "$config['thumbnail']['maxsize'] = 3000;" >> $microblog_config_file + echo "$config['profile']['delete'] = true;" >> $microblog_config_file + echo "$config['profile']['changenick'] = true;" >> $microblog_config_file + echo "$config['public']['localonly'] = false;" >> $microblog_config_file + echo "addPlugin('StoreRemoteMedia');" >> $microblog_config_file + fi + MICROBLOG_ONION_HOSTNAME=$(add_onion_service microblog 80 ${MICROBLOG_ONION_PORT}) systemctl restart php5-fpm @@ -8604,8 +8619,26 @@ function install_gnu_social_theme { cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/Qvitter git checkout $MICROBLOG_THEME_COMMIT -b $MICROBLOG_THEME_COMMIT - if ! grep -q "addPlugin('Qvitter')" /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php; then - echo "addPlugin('Qvitter');" >> /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php + microblog_config_file=/var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php + if ! grep -q "addPlugin('Qvitter')" $microblog_config_file; then + echo "" >> $microblog_config_file + echo "// Qvitter settings" >> $microblog_config_file + echo "addPlugin('Qvitter');" >> $microblog_config_file + echo "$config['site']['qvitter']['enabledbydefault'] = true;" >> $microblog_config_file + echo "$config['site']['qvitter']['defaultbackgroundcolor'] = '#f4f4f4';" >> $microblog_config_file + echo "$config['site']['qvitter']['defaultlinkcolor'] = '#0084B4';" >> $microblog_config_file + echo "$config['site']['qvitter']['timebetweenpolling'] = 5000;" >> $microblog_config_file + echo "$config['site']['qvitter']['urlshortenerapiurl'] = 'http://qttr.at/shortener.php';" >> $microblog_config_file + echo "$config['site']['qvitter']['urlshortenersignature'] = 'b6afeec983';" >> $microblog_config_file + echo "$config['site']['qvitter']['sitebackground'] = 'img/vagnsmossen.jpg';" >> $microblog_config_file + echo "$config['site']['qvitter']['favicon'] = 'img/favicon.ico?v=4';" >> $microblog_config_file + echo "$config['site']['qvitter']['sprite'] = Plugin::staticPath('Qvitter', '').'img/sprite.png?v=40';" >> $microblog_config_file + echo "$config['site']['qvitter']['enablewelcometext'] = true;" >> $microblog_config_file + echo "$config['site']['qvitter']['customwelcometext']['en'] = '$MICROBLOG_WELCOME_MESSAGE';" >> $microblog_config_file + echo "$config['site']['qvitter']['customwelcometext']['de'] = '$MICROBLOG_WELCOME_MESSAGE';" >> $microblog_config_file + echo "$config['site']['qvitter']['customwelcometext']['fr'] = '$MICROBLOG_WELCOME_MESSAGE';" >> $microblog_config_file + echo "$config['site']['qvitter']['customwelcometext']['es'] = '$MICROBLOG_WELCOME_MESSAGE';" >> $microblog_config_file + echo "$config['site']['qvitter']['blocked_ips'] = array();" >> $microblog_config_file fi if ! grep -q "GNU Social theme commit" $COMPLETION_FILE; then