gcc484ntopperl-5.22
Last change
on this file since c5c522c was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100755
|
File size:
866 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | #postinst.sh post.daemontools || exit 1 |
---|
3 | |
---|
4 | export PGUSER=postgresql |
---|
5 | unset LANG LC_LANG LC_MESSAGES |
---|
6 | |
---|
7 | # Add de postgresql user.... |
---|
8 | useradd -u 100 postgresql &> /dev/null |
---|
9 | |
---|
10 | svcstop /service/postgresql || exit 1 |
---|
11 | |
---|
12 | #setuidgid postgresql pg_ctl stop -m fast -D /home/system/postgresql/data &>/dev/null |
---|
13 | |
---|
14 | # initialiseer de database voor de 1e keer.... |
---|
15 | if [ ! -d /home/system/postgresql/data ]; then |
---|
16 | mkdir -p /home/system/postgresql/data |
---|
17 | chown postgresql /home/system/postgresql/data |
---|
18 | chmod 700 /home/system/postgresql/data |
---|
19 | su postgresql -c 'initdb -D /home/system/postgresql/data' || exit 1 |
---|
20 | fi |
---|
21 | |
---|
22 | svcstart /service/postgresql || exit 1 |
---|
23 | |
---|
24 | if ! pg_dump -U postgresql postgresql &> /dev/null; then |
---|
25 | echo "postgresql database aanmaken..." |
---|
26 | sleep 1 |
---|
27 | createdb -U postgresql postgresql &> /dev/null || exit 1 |
---|
28 | fi |
---|
29 | |
---|
30 | svcreset /service/postgresql || exit 1 |
---|
Note: See
TracBrowser
for help on using the repository browser.