Skip to content

Commit 4a61e80

Browse files
authored
Update service.sh
1 parent 0595b68 commit 4a61e80

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

allinone/service.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ function init_pg() {
1717
return
1818
fi
1919

20-
if [[ ! -f /var/lib/postgresql/13/main/inited.txt ]];then
21-
sudo -u postgres psql -c "ALTER USER postgres PASSWORD '$DB_PASSWORD';"
22-
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
23-
touch /var/lib/postgresql/13/main/inited.txt
24-
fi
25-
2620
echo ">> Start database postgre"
2721
chown -R postgres:postgres /var/lib/postgresql/13/main
2822
pg_ctlcluster 13 main start
23+
sleep 3
2924

25+
if [[ ! -f /var/lib/postgresql/13/main/inited.txt ]];then
26+
sudo -u postgres psql -c "ALTER USER postgres PASSWORD '$DB_PASSWORD';"
27+
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
28+
touch /var/lib/postgresql/13/main/inited.txt
29+
fi
3030
}
3131

3232
function init_ng(){

0 commit comments

Comments
 (0)