You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
665 B
20 lines
665 B
#!/bin/sh |
|
## |
|
## cockroach.sh -- CockroachDB CLI Wrapper |
|
## |
|
|
|
if [ ".$COCKROACH_HOST" = . ]; then |
|
COCKROACH_HOST="`grep '^host=' @l_prefix@/etc/cockroach/cockroach.conf | sed -e 's;^[^=]*=;;'`" |
|
export COCKROACH_HOST |
|
fi |
|
if [ ".$COCKROACH_PORT" = . ]; then |
|
COCKROACH_PORT="`grep '^port=' @l_prefix@/etc/cockroach/cockroach.conf | sed -e 's;^[^=]*=;;'`" |
|
export COCKROACH_PORT |
|
fi |
|
if [ ! -d "$HOME/.cockroach-certs" -a ".$COCKROACH_CERTS_DIR" = . ]; then |
|
COCKROACH_CERTS_DIR="`grep '^certs-dir=' @l_prefix@/etc/cockroach/cockroach.conf | sed -e 's;^[^=]*=;;'`" |
|
export COCKROACH_CERTS_DIR |
|
fi |
|
|
|
exec @l_prefix@/libexec/cockroach/cockroach ${1+"$@"} |
|
|
|
|