wok rev 1967
pgsql: external init script support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jan 01 13:44:39 2009 +0000 (2009-01-01) |
parents | 49b2e5444f68 |
children | 1dd05d636371 |
files | postgresql/receipt postgresql/stuff/etc/init.d/postgresql |
line diff
1.1 --- a/postgresql/receipt Thu Jan 01 13:40:42 2009 +0000 1.2 +++ b/postgresql/receipt Thu Jan 01 13:44:39 2009 +0000 1.3 @@ -30,7 +30,7 @@ 1.4 genpkg_rules() 1.5 { 1.6 mkdir -p $fs/usr/share $fs/usr/lib $fs/var/lib/pgsql \ 1.7 - $fs/var/log/postgresql 1.8 + $fs/var/log/postgresql $fs/etc/pgsql.d 1.9 cp -a $_pkg/usr/bin $fs/usr 1.10 cp -a $_pkg/usr/lib/postgresql $fs/usr/lib 1.11 rm -f $fs/usr/lib/postgresql/*a
2.1 --- a/postgresql/stuff/etc/init.d/postgresql Thu Jan 01 13:40:42 2009 +0000 2.2 +++ b/postgresql/stuff/etc/init.d/postgresql Thu Jan 01 13:44:39 2009 +0000 2.3 @@ -21,10 +21,21 @@ 2.4 echo "Initializing $DESC database" 2.5 rm -rf /var/lib/pgsql/* 2> /dev/null 2.6 su -c "initdb $INIT_OPTIONS" - postgres 2.7 + echo -n "Starting $DESC: $NAME... " 2.8 + su -c "pg_ctl start -w $OPTIONS -l /var/log/postgresql/postgresql.log" - postgres 2.9 + status 2.10 + sleep 2 2.11 + for i in /etc/pgsql.d/* ; do 2.12 + [ -x $i ] || continue 2.13 + echo "Running $i..." 2.14 + $i 2.15 + done 2.16 + else 2.17 + echo -n "Starting $DESC: $NAME... " 2.18 + su -c "pg_ctl start -w $OPTIONS -l /var/log/postgresql/postgresql.log" - postgres 2.19 + status 2.20 + sleep 2 2.21 fi 2.22 - echo -n "Starting $DESC: $NAME... " 2.23 - su -c "pg_ctl start -w $OPTIONS -l /var/log/postgresql/postgresql.log" - postgres 2.24 - status 2.25 # su -c "createdb test" - postgres 2.26 # su -c "psql test" - postgres 2.27 ;;