summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2001-01-23 17:12:14 +0000
committerAchim Gottinger <achim@gentoo.org>2001-01-23 17:12:14 +0000
commit2d7d9d92276c3d82ce8a841145eb9e25966d4a46 (patch)
tree16fbf53b53921676308836144c2414cf13917063 /dev-db
parent*** empty log message *** (diff)
downloadhistorical-2d7d9d92276c3d82ce8a841145eb9e25966d4a46.tar.gz
historical-2d7d9d92276c3d82ce8a841145eb9e25966d4a46.tar.bz2
historical-2d7d9d92276c3d82ce8a841145eb9e25966d4a46.zip
*** empty log message ***
Diffstat (limited to 'dev-db')
-rwxr-xr-xdev-db/postgresql/files/postgres46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/postgres b/dev-db/postgresql/files/postgres
new file mode 100755
index 000000000000..6bbb3cd596ef
--- /dev/null
+++ b/dev-db/postgresql/files/postgres
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+##########################################################################################
+#RCUPDATE:3 4:71:Required for rc-update
+. /etc/rc.d/config/functions
+
+. /etc/rc.d/config/basic
+
+SERVICE=posgres
+EXE="/usr/bin/postmaster"
+opts="start stop restart"
+
+PGUSER="postgres"
+USE_SYSLOG="yes"
+FACILITY="local5"
+PGLOGFILE="/tmp/portgres.log"
+PGOPTS="-D/var/lib/pgsql"
+PGPORT="5433"
+
+start() {
+ if [ -f ${PGLOGFILE} ]
+ then
+ my ${PGLOGFILE} ${PGLOGFILE}.old
+ fi
+ einfo "Starting ${SERVICE}.."
+ if [ "${USE_SYSLOG}" = "yes" ]
+ then
+ su - ${PGUSER} -c "${EXE} ${PGOPTS} -p ${PGPORT} 2>&1" | logger -p ${FACILITY}.notice 1>&2 &
+ fi
+ eend $? "Error starting ${SERVICE}."
+}
+
+stop () {
+ einfo "Stopping ${SERVICE}..."
+ killall -TERM ${EXE}
+ eend $? "Error stopping ${SERVICE}."
+}
+
+restart() {
+ stop
+ start
+}
+
+doservice ${@}
+
+