diff options
Diffstat (limited to 'testing/postgresql/postgresql')
-rwxr-xr-x | testing/postgresql/postgresql | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/testing/postgresql/postgresql b/testing/postgresql/postgresql deleted file mode 100755 index 0fbe94036..000000000 --- a/testing/postgresql/postgresql +++ /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} -PG_CTL="/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -s -w" - -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 /var/log/postgresql.log ]; then - touch /var/log/postgresql.log - chown postgres /var/log/postgresql.log - fi -} - -case "$1" in - start) - postgres_init - stat_busy "Starting PostgreSQL" - su - postgres -c \ - "$PG_CTL start" - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - add_daemon postgresql - stat_done - fi - ;; - stop) - stat_busy "Stopping PostgreSQL" - su - postgres -c \ - "$PG_CTL stop -m fast" - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon postgresql - stat_done - fi - ;; - reload) - stat_busy "Reloading PostgreSQL" - su - postgres -c \ - "$PG_CTL reload" - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - stat_done - fi - ;; - restart) - postgres_init - stat_busy "Restarting PostgreSQL" - su - postgres -c \ - "$PG_CTL restart -m fast" - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - add_daemon postgresql - stat_done - fi - ;; - status) - stat_busy "Checking PostgreSQL status"; - ck_status postgresql - ;; - *) - echo "usage: $0 {start|stop|reload|restart|status}" -esac -exit 0 |