Ticket #1926: 019.pg_autovacuum.2.sh
File 019.pg_autovacuum.2.sh, 405 bytes (added by decibel (Jim Nasby), 20 years ago) |
---|
Line | |
---|---|
1 | #!/bin/sh |
2 | |
3 | CONFIG="" |
4 | LOGFILE=/opt/local/var/log/pgsql/pg_autovacuum.log |
5 | |
6 | PREFIX=/opt/local |
7 | PGBIN=${PREFIX}/bin |
8 | |
9 | case $1 in |
10 | start) |
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 | ;; |
22 | esac |