More automated install for gnusocial
This commit is contained in:
parent
f81489bd74
commit
052017fa56
|
@ -8518,32 +8518,29 @@ function install_gnu_social {
|
||||||
fi
|
fi
|
||||||
nginx_ensite $MICROBLOG_DOMAIN_NAME
|
nginx_ensite $MICROBLOG_DOMAIN_NAME
|
||||||
|
|
||||||
|
# NOTE: For the typical case always enable SSL and only
|
||||||
|
# disable it if in onion only mode. This is due to complexities
|
||||||
|
# with the way URLs are generated by GNU Social
|
||||||
|
gnu_social_ssl='always'
|
||||||
|
if [[ $ONION_ONLY != 'no' ]]; then
|
||||||
|
gnu_social_ssl='never'
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the configuration
|
# Create the configuration
|
||||||
#echo '<?php' > /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
gnu_social_installer=/var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/scripts/install_cli.php
|
||||||
#echo "if (!defined('GNUSOCIAL')) { exit(1); }" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
${gnu_social_installer} --host="localhost" --database="gnusocial" \
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
--dbtype=mysql --username="root" -v \
|
||||||
#echo "$config['site']['name'] = 'Freedombone Social';" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
--password="$MARIADB_PASSWORD" \
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
--sitename="My Social Network" --fancy \
|
||||||
#echo "$config['site']['server'] = '$MICROBLOG_DOMAIN_NAME';" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
--admin-nick="gnusocialadmin" \
|
||||||
#echo "$config['site']['path'] = false;" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
--admin-pass="$MICROBLOG_ADMIN_PASSWORD" \
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
--site-profile="community" \
|
||||||
#if [[ $ONION_ONLY == "no" ]]; then
|
--ssl=${gnu_social_ssl}
|
||||||
# echo "$config['site']['ssl'] = 'always'; " >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
if [ ! "$?" = "0" ]; then
|
||||||
#else
|
# failed to install
|
||||||
# echo "$config['site']['ssl'] = 'never'; " >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
echo $'Could not install GNU Social'
|
||||||
#fi
|
exit 72357
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
fi
|
||||||
#echo "$config['site']['fancy'] = true;" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo "$config['db']['database'] = 'mysqli://root:${MARIADB_PASSWORD}@localhost/gnusocial';" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo "$config['db']['type'] = 'mysql';" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo '// Uncomment below for better performance. Just remember you must run' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo '// php scripts/checkschema.php whenever your enabled plugins change!' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo "$config['db']['schemacheck'] = 'script';" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo '' >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
#echo "$config['site']['profile'] = 'community';" >> /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs/config.php
|
|
||||||
|
|
||||||
MICROBLOG_ONION_HOSTNAME=$(add_onion_service microblog 80 ${MICROBLOG_ONION_PORT})
|
MICROBLOG_ONION_HOSTNAME=$(add_onion_service microblog 80 ${MICROBLOG_ONION_PORT})
|
||||||
|
|
||||||
|
@ -8564,33 +8561,8 @@ function install_gnu_social {
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo $'Microblog' >> /home/$MY_USERNAME/README
|
echo $'Microblog' >> /home/$MY_USERNAME/README
|
||||||
echo '=========' >> /home/$MY_USERNAME/README
|
echo '=========' >> /home/$MY_USERNAME/README
|
||||||
echo $"To set up your microblog go to" >> /home/$MY_USERNAME/README
|
echo $"Microblog administrator nickname: gnusocialadmin" >> /home/$MY_USERNAME/README
|
||||||
echo $"https://$MICROBLOG_DOMAIN_NAME/install.php" >> /home/$MY_USERNAME/README
|
echo $"Microblog administrator password: $MICROBLOG_ADMIN_PASSWORD" >> /home/$MY_USERNAME/README
|
||||||
echo $'and enter the following settings:' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Set a name for the site' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Server SSL: enable' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Hostname: localhost' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Type: MySql/MariaDB' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Name: gnusocial' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - DB username: root' >> /home/$MY_USERNAME/README
|
|
||||||
echo $" - DB Password; $MARIADB_PASSWORD" >> /home/$MY_USERNAME/README
|
|
||||||
echo $" - Administrator nickname: $MY_USERNAME" >> /home/$MY_USERNAME/README
|
|
||||||
echo $" - Administrator password: $MICROBLOG_ADMIN_PASSWORD" >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Subscribe to announcements: ticked' >> /home/$MY_USERNAME/README
|
|
||||||
echo $' - Site profile: Community' >> /home/$MY_USERNAME/README
|
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'When the install is complete you will see a lot of warnings' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'but just ignore those and navigate to ' >> /home/$MY_USERNAME/README
|
|
||||||
echo $"https://$MICROBLOG_DOMAIN_NAME and you can then " >> /home/$MY_USERNAME/README
|
|
||||||
echo $'complete the configuration via the *Admin* section on the header' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'bar. Some recommended admin settings are:' >> /home/$MY_USERNAME/README
|
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Under the *Site* settings:' >> /home/$MY_USERNAME/README
|
|
||||||
echo ' Text limit: 140' >> /home/$MY_USERNAME/README
|
|
||||||
echo ' Dupe Limit: 60000' >> /home/$MY_USERNAME/README
|
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
|
||||||
echo $'Under the *User* settings:' >> /home/$MY_USERNAME/README
|
|
||||||
echo ' Bio limit: 1000' >> /home/$MY_USERNAME/README
|
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo $'Under the *Access* settings:' >> /home/$MY_USERNAME/README
|
echo $'Under the *Access* settings:' >> /home/$MY_USERNAME/README
|
||||||
echo ' /Invite only/ ticked' >> /home/$MY_USERNAME/README
|
echo ' /Invite only/ ticked' >> /home/$MY_USERNAME/README
|
||||||
|
|
Loading…
Reference in New Issue