Browse Source

Chris Efant:


			
			
				rocklinux
			
			
		
Chris Efant 21 years ago
parent
commit
5e1e2119ff
2 changed files with 39 additions and 0 deletions
  1. +18
    -0
      package/michiel/postgresql/postgresql.conf
  2. +21
    -0
      package/michiel/postgresql/postgresql.init

+ 18
- 0
package/michiel/postgresql/postgresql.conf

@ -29,6 +29,24 @@ var_append extraconfopt " " "--with-CXX"
var_append extraconfopt " " "--with-gnu-ld"
var_append extraconfopt " " "--with-perl"
postgresql_pm() {
# Create the data directory
mkdir -p $root/$localstatedir/data
chown -R postgres:postgres $root/$localstatedir/data
# Create the Profile
echo "Creating /etc/profile.d/$pkg ..."
cat <<- EOT > $root/etc/profile.d/$pkg
export PGDATA=$localstatedir/data
EOT
# Install the init
install_init postgresql $confdir/postgresql.init
}
# other packages may need to know where postgres is.
hook_add postmake 3 "echo \"pkg_postgresql_prefix=/$prefix\" \
> $root/var/adm/parse-config/postgresql"
postmake="postgresql_pm"

+ 21
- 0
package/michiel/postgresql/postgresql.init

@ -0,0 +1,21 @@
#!/bin/sh
#
# Desc: The PostgreSQL server
# Runlevel: 30 rcX
#
main_begin
block_begin(start, `Starting PostgreSQL Server.')
check(`(su postgres -c "D_prefix/bin/postmaster -i -S")')
block_end
block_begin(stop, `Stopping PostgreSQL Server.')
check(`killall postmaster')
block_end
block_begin(restart, `Restarting PostgreSQL Server.')
check(`killall -1 postmaster')
block_end
main_end

Loading…
Cancel
Save