浏览代码

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 年前
父节点
当前提交
2e6f9e3507
共有 3 个文件被更改,包括 8 次插入5 次删除
  1. 6
    3
      src/freedombone-app-pleroma
  2. 1
    1
      src/freedombone-utils-nodejs
  3. 1
    1
      src/freedombone-utils-postgresql

+ 6
- 3
src/freedombone-app-pleroma 查看文件

199
         return
199
         return
200
     fi
200
     fi
201
 
201
 
202
+    systemctl restart postgresql
202
     add_postgresql_user pleroma "$PLEROMA_ADMIN_PASSWORD" encrypted
203
     add_postgresql_user pleroma "$PLEROMA_ADMIN_PASSWORD" encrypted
203
     run_system_query_postgresql "create database pleroma;"
204
     run_system_query_postgresql "create database pleroma;"
204
     # temporarily allow the user to create databases
205
     # temporarily allow the user to create databases
207
     run_system_query_postgresql "GRANT ALL ON ALL tables IN SCHEMA public TO pleroma;"
208
     run_system_query_postgresql "GRANT ALL ON ALL tables IN SCHEMA public TO pleroma;"
208
     run_system_query_postgresql "GRANT ALL ON ALL sequences IN SCHEMA public TO pleroma;"
209
     run_system_query_postgresql "GRANT ALL ON ALL sequences IN SCHEMA public TO pleroma;"
209
     run_system_query_postgresql "CREATE EXTENSION citext;"
210
     run_system_query_postgresql "CREATE EXTENSION citext;"
211
+    run_system_query_postgresql "set statement_timeout to 20000;"
210
 
212
 
211
     read_config_param "PLEROMA_SECRET_KEY"
213
     read_config_param "PLEROMA_SECRET_KEY"
212
-    if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then
213
-        PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)"
214
-        if [ ${#PLEROMA_SECRET_KEY} -lt 50 ]; then
214
+    if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then
215
+        PLEROMA_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)"
216
+        if [ ${#PLEROMA_SECRET_KEY} -lt 64 ]; then
215
             run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
217
             run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
216
             run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
218
             run_system_query_postgresql "ALTER USER pleroma NOCREATEDB;"
217
             echo $'Pleroma secret key not created'
219
             echo $'Pleroma secret key not created'
244
     fi
246
     fi
245
     sudo -u pleroma mix local.hex --force
247
     sudo -u pleroma mix local.hex --force
246
     sudo -u pleroma mix deps.compile mimerl
248
     sudo -u pleroma mix deps.compile mimerl
249
+    systemctl restart postgresql
247
     sudo -u pleroma mix ecto.create --force
250
     sudo -u pleroma mix ecto.create --force
248
     if [ ! "$?" = "0" ]; then
251
     if [ ! "$?" = "0" ]; then
249
         run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
252
         run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"

+ 1
- 1
src/freedombone-utils-nodejs 查看文件

36
 # change these versions at your peril. Things will often crash if you don't
36
 # change these versions at your peril. Things will often crash if you don't
37
 # have specifically the correct versions
37
 # have specifically the correct versions
38
 NODEJS_VERSION='6.11.4'
38
 NODEJS_VERSION='6.11.4'
39
-NODEJS_N_VERSION='2.1.8'
39
+NODEJS_N_VERSION='2.1.7'
40
 NPM_VERSION='4.0.5'
40
 NPM_VERSION='4.0.5'
41
 
41
 
42
 # This file keeps track of the apps needing nodejs
42
 # This file keeps track of the apps needing nodejs

+ 1
- 1
src/freedombone-utils-postgresql 查看文件

64
     fi
64
     fi
65
     ${PROJECT_NAME}-pass -u root -a postgresql -p "$POSTGRESQL_PASSWORD"
65
     ${PROJECT_NAME}-pass -u root -a postgresql -p "$POSTGRESQL_PASSWORD"
66
 
66
 
67
-    apt-get -yq install postgresql postgresql-contrib postgresql-client
67
+    apt-get -yq install postgresql-9.6 postgresql-contrib-9.6 postgresql-client
68
     apt-get -yq remove --purge apache2-bin*
68
     apt-get -yq remove --purge apache2-bin*
69
     if [ -d /etc/apache2 ]; then
69
     if [ -d /etc/apache2 ]; then
70
         rm -rf /etc/apache2
70
         rm -rf /etc/apache2