You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/lib.sh
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -113,15 +113,13 @@ function configure_nginx() {
113
113
local __enabled="$__nginx/sites-enabled"
114
114
115
115
if [[ "$DISTRO"=="centos" ]];then
116
-
$__available="$__nginx/conf.d"
117
-
$__enabled="$__nginx/conf.d"
116
+
__available="$__nginx/conf.d"
117
+
__enabled="$__nginx/conf.d"
118
118
fi
119
119
120
120
sudo mkdir -p "$__available"
121
121
sudo mkdir -p "$__enabled"
122
122
123
-
if [[ "$DISTRO"=="ubuntu" ]];then
124
-
125
123
cat "$__conf"| sed "s|PUBLIC_PORT|$__pport|g"| sed "s|CER_FILE|$__cert|g"| sed "s|KEY_FILE|$__key|g"| sed "s|DHPARAM_FILE|$__dh|g"| sed "s|PRIVATE_PORT|$__iport|g"| sudo tee "$__available/$__out"
126
124
127
125
if [[ -f"$__enabled/default" ]];then
@@ -263,20 +261,21 @@ function install_postgresql10_xenial() {
263
261
264
262
package "postgresql-$__pgversion"
265
263
266
-
configure_postgres "$__pgversion""$__pgconf"
264
+
configure_postgres "$__pgconf""postgresql"
267
265
}
268
266
269
267
# Create empty DB and username
270
268
# string PostgreSQL_db_name
271
269
# string PostgreSQL_system_user
272
270
# string PostgreSQL_db_user
273
271
# string PostgreSQL_db_pass
272
+
# string PostgerSQL_psql
274
273
functiondb_user_postgresql() {
275
-
local __psql="/usr/lib/postgresql/10/bin/psql"
276
274
local __pgdb=$1
277
275
local __pguser=$2
278
276
local __dbuser=$3
279
277
local __dbpass=$4
278
+
local __psql=$5
280
279
281
280
log "Creating user"
282
281
local _dbstatementuser="CREATE USER $__dbuser;"
@@ -327,15 +326,19 @@ function repo_postgres_xenial() {
0 commit comments