[arch-commits] Commit in postgresql/trunk (PKGBUILD postgresql postgresql.rcd)
Dan McGee
dan at archlinux.org
Mon Feb 13 04:51:20 UTC 2012
Date: Sunday, February 12, 2012 @ 23:51:20
Author: dan
Revision: 150125
Fix FS#27541
Added:
postgresql/trunk/postgresql.rcd
(from rev 145297, postgresql/trunk/postgresql)
Modified:
postgresql/trunk/PKGBUILD
Deleted:
postgresql/trunk/postgresql
----------------+
PKGBUILD | 8 ++---
postgresql | 79 -------------------------------------------------------
postgresql.rcd | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 83 insertions(+), 83 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-02-13 02:51:13 UTC (rev 150124)
+++ PKGBUILD 2012-02-13 04:51:20 UTC (rev 150125)
@@ -11,7 +11,7 @@
license=('custom:PostgreSQL')
makedepends=('libxml2' 'python2' 'perl' 'openssl>=1.0.0')
source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
- postgresql postgresql.confd postgresql.pam postgresql.logrotate)
+ postgresql.rcd postgresql.confd postgresql.pam postgresql.logrotate)
build() {
cd "${srcdir}/postgresql-${pkgver}"
@@ -113,7 +113,7 @@
rmdir "${pkgdir}/usr/share/doc/postgresql/html"
# install launch script
- install -D -m755 "${srcdir}/postgresql" "${pkgdir}/etc/rc.d/postgresql"
+ install -D -m755 "${srcdir}/postgresql.rcd" "${pkgdir}/etc/rc.d/postgresql"
# install conf file
install -D -m644 ${srcdir}/postgresql.confd \
@@ -127,12 +127,12 @@
}
md5sums=('7dbff52221954c46595313eb7f92c3e0'
- '4a6e9b63f2aa50195735f2b46aba040b'
+ '1ddd1df8010549f237e7983bb326025e'
'a54d09a20ab1672adf08f037df188d53'
'96f82c38f3f540b53f3e5144900acf17'
'd28e443f9f65a5712c52018b84e27137')
sha256sums=('8d54ff514f5b2754e6e36b008c43d7bbf7daf541da608767cc5bdedb1de5db30'
- 'b2931d7a719e765f14811b9109310b2418d3064bfcedef699573fc25854a2201'
+ '9f6307b1358892e304f9474a456f0cb9160cfb8812a9da0430abe647f8a9cf45'
'3de5c059eead8816db15c2c5588e6196d6c4b0d704faf1a20912796cf589ba81'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e')
Deleted: postgresql
===================================================================
--- postgresql 2012-02-13 02:51:13 UTC (rev 150124)
+++ postgresql 2012-02-13 04:51:20 UTC (rev 150125)
@@ -1,79 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/postgresql
-
-# Default PGROOT if it wasn't defined in the conf.d file
-PGROOT=${PGROOT:-/var/lib/postgres}
-PGLOG=${PGLOG:-/var/log/postgresql.log}
-PGCTL_BIN=/usr/bin/pg_ctl
-PGCTL_ARGS=(-D "$PGROOT/data" -l "$PGLOG" -s -w)
-[[ $PGOPTS ]] && PGCTL_ARGS+=(-o "$PGOPTS")
-
-postgres_init() {
- # initialization
- if [[ ! -d "$PGROOT/data" ]]; then
- mkdir -p "$PGROOT/data" && chown -R postgres:postgres "$PGROOT"
- su - postgres -c "/usr/bin/initdb $INITOPTS -D '$PGROOT/data'"
- fi
- if [[ ! -e "$PGLOG" ]]; then
- touch "$PGLOG"
- chown postgres "$PGLOG"
- fi
-}
-
-do_postgres() {
- su - postgres -c "'$PGCTL_BIN' $(printf '%q ' "${PGCTL_ARGS[@]}") $@"
-}
-
-case $1 in
- start)
- postgres_init
- stat_busy "Starting PostgreSQL"
- if do_postgres start; then
- add_daemon postgresql
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- stop)
- stat_busy "Stopping PostgreSQL"
- if do_postgres stop -m fast; then
- rm_daemon postgresql
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- reload)
- stat_busy "Reloading PostgreSQL"
- if do_postgres reload; then
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- restart)
- postgres_init
- stat_busy "Restarting PostgreSQL"
- if do_postgres restart -m fast; then
- add_daemon postgresql
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- status)
- stat_busy "Checking PostgreSQL status";
- ck_status postgresql
- ;;
- *)
- echo "usage: $0 {start|stop|reload|restart|status}"
- exit 1
-esac
Copied: postgresql/trunk/postgresql.rcd (from rev 145297, postgresql/trunk/postgresql)
===================================================================
--- postgresql.rcd (rev 0)
+++ postgresql.rcd 2012-02-13 04:51:20 UTC (rev 150125)
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/postgresql
+
+# Default PGROOT if it wasn't defined in the conf.d file
+PGROOT=${PGROOT:-/var/lib/postgres}
+PGLOG=${PGLOG:-/var/log/postgresql.log}
+PGCTL_BIN=/usr/bin/pg_ctl
+PGCTL_ARGS=(-D "$PGROOT/data" -l "$PGLOG" -s -w)
+[[ $PGOPTS ]] && PGCTL_ARGS+=(-o "$PGOPTS")
+
+postgres_init() {
+ # initialization
+ if [[ ! -d "$PGROOT/data" ]]; then
+ mkdir -p "$PGROOT/data" && chown -R postgres:postgres "$PGROOT"
+ su - postgres -c "/usr/bin/initdb $INITOPTS -D '$PGROOT/data'"
+ fi
+ if [[ ! -e "$PGLOG" ]]; then
+ touch "$PGLOG"
+ chown postgres "$PGLOG"
+ fi
+}
+
+do_postgres() {
+ su - postgres -c "'$PGCTL_BIN' $(printf '%q ' "${PGCTL_ARGS[@]}" "$@")"
+}
+
+case $1 in
+ start)
+ postgres_init
+ stat_busy "Starting PostgreSQL"
+ if do_postgres start; then
+ add_daemon postgresql
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping PostgreSQL"
+ if do_postgres stop -m fast; then
+ rm_daemon postgresql
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ reload)
+ stat_busy "Reloading PostgreSQL"
+ if do_postgres reload; then
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ restart)
+ postgres_init
+ stat_busy "Restarting PostgreSQL"
+ if do_postgres restart -m fast; then
+ add_daemon postgresql
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ status)
+ stat_busy "Checking PostgreSQL status";
+ ck_status postgresql
+ ;;
+ *)
+ echo "usage: $0 {start|stop|reload|restart|status}"
+ exit 1
+esac
More information about the arch-commits
mailing list