diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-08-22 11:02:40 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-08-22 11:02:40 +0200 |
commit | 55a7d75889507a9882c91f8c0a44ea9460a5d095 (patch) | |
tree | e4d40e8bdb76614317edbd6d07f1d226eb80bb39 /testing/postgresql/postgresql.rcd | |
parent | f23b8ed12499118d66340154fe8369623da3da34 (diff) | |
parent | 297a042ac9a7bbd2b18a9551f5fa4fe43faf53b2 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
core/rfkill/PKGBUILD
extra/libkgapi/PKGBUILD
extra/transmission/PKGBUILD
testing/grep/PKGBUILD
testing/grep/grep.install
Diffstat (limited to 'testing/postgresql/postgresql.rcd')
-rwxr-xr-x | testing/postgresql/postgresql.rcd | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/testing/postgresql/postgresql.rcd b/testing/postgresql/postgresql.rcd deleted file mode 100755 index f3600b30b..000000000 --- a/testing/postgresql/postgresql.rcd +++ /dev/null @@ -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 |