diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index a4bbc8a2..fef6e695 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -199,6 +199,7 @@ function pleroma_create_database { return fi + systemctl restart postgresql add_postgresql_user pleroma "$PLEROMA_ADMIN_PASSWORD" encrypted run_system_query_postgresql "create database pleroma;" # temporarily allow the user to create databases @@ -207,11 +208,12 @@ function pleroma_create_database { run_system_query_postgresql "GRANT ALL ON ALL tables IN SCHEMA public TO pleroma;" run_system_query_postgresql "GRANT ALL ON ALL sequences IN SCHEMA public TO pleroma;" run_system_query_postgresql "CREATE EXTENSION citext;" + run_system_query_postgresql "set statement_timeout to 20000;" read_config_param "PLEROMA_SECRET_KEY" - if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then - PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)" - if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then + if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then + PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)" + if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;" run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;" echo $'Pleroma secret key not created' @@ -244,6 +246,7 @@ function pleroma_create_database { fi sudo -u pleroma mix local.hex --force sudo -u pleroma mix deps.compile mimerl + systemctl restart postgresql sudo -u pleroma mix ecto.create --force if [ ! "$?" = "0" ]; then run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;" diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index eab687bc..2b02db86 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -36,7 +36,7 @@ VARIANTS='mesh' # change these versions at your peril. Things will often crash if you don't # have specifically the correct versions NODEJS_VERSION='6.11.4' -NODEJS_N_VERSION='2.1.8' +NODEJS_N_VERSION='2.1.7' NPM_VERSION='4.0.5' # This file keeps track of the apps needing nodejs diff --git a/src/freedombone-utils-postgresql b/src/freedombone-utils-postgresql index b92993c8..14e3939b 100755 --- a/src/freedombone-utils-postgresql +++ b/src/freedombone-utils-postgresql @@ -64,7 +64,7 @@ function install_postgresql { fi ${PROJECT_NAME}-pass -u root -a postgresql -p "$POSTGRESQL_PASSWORD" - apt-get -yq install postgresql postgresql-contrib postgresql-client + apt-get -yq install postgresql-9.6 postgresql-contrib-9.6 postgresql-client apt-get -yq remove --purge apache2-bin* if [ -d /etc/apache2 ]; then rm -rf /etc/apache2