Code

pgtest.sh: Added 'restart' command.
authorSebastian Harl <sh@tokkee.org>
Tue, 23 Oct 2012 11:03:26 +0000 (13:03 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 23 Oct 2012 11:03:26 +0000 (13:03 +0200)
This will restart the PostgreSQL server in the background if it was running
previously.

pgtest.sh

index 3c746295d8e1901973847afd1a8bb1052a5b8503..fb033ffa430e2adec98a1933e604d610f8377b5f 100755 (executable)
--- a/pgtest.sh
+++ b/pgtest.sh
@@ -91,6 +91,9 @@ case "$1" in
                        $BIN_DIR/postgres -D $TARGET/var/lib/postgresql/main "$@"
                fi
                ;;
+       restart)
+               $0 stop && $0 start -B
+               ;;
        *)
                echo "Usage: $0 setup|client|stop|start" >&2
                echo ""