Ticket #1926: 019.pg_autovacuum.2.sh

File 019.pg_autovacuum.2.sh, 405 bytes (added by decibel (Jim Nasby), 20 years ago)

Script to start pg_autovacuum

Line 
1#!/bin/sh
2
3CONFIG=""
4LOGFILE=/opt/local/var/log/pgsql/pg_autovacuum.log
5
6PREFIX=/opt/local
7PGBIN=${PREFIX}/bin
8
9case $1 in
10start)
11    [ -x ${PGBIN}/pg_autovacuum ] && {
12        [ x${LOGFILE} != x ] && CONFIG="${CONFIG} -L ${LOGFILE}"
13        echo -n ' pg_autovacuum'
14        su -l postgres -c "exec ${PREFIX}/bin/pg_autovacuum -D ${CONFIG}"
15    }
16    ;;
17
18*)
19    echo "usage: `basename $0` {start}" >&2
20    exit 64
21    ;;
22esac