Skip to content

Commit 7061ecd

Browse files
committed
Minor fix to gaol-basher
1 parent 83a35f8 commit 7061ecd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ci/release_notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Bug Fixes
2+
3+
- gaol-basher no works when run as non-vcap users

src/gaol/gaol-basher

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ help() {
2020
get_deployments() {
2121
echo -e "\nDeployments:"
2222
echo -e "------------"
23-
/var/vcap/packages/postgres/bin/psql -c "select id, name from deployments;" bosh
23+
/var/vcap/packages/postgres/bin/psql -U vcap -c "select id, name from deployments;" bosh
2424
}
2525

2626
get_jobs() {
2727
echo -e "\nJobs:"
2828
echo -e "------"
29-
/var/vcap/packages/postgres/bin/psql -c "select id as job_number, job || '/' || index as job, vm_cid as container_uuid from instances WHERE vm_cid IS NOT NULL AND deployment_id = $1;" bosh
29+
/var/vcap/packages/postgres/bin/psql -U vcap -c "select id as job_number, job || '/' || index as job, vm_cid as container_uuid from instances WHERE vm_cid IS NOT NULL AND deployment_id = $1;" bosh
3030
}
3131

3232
get_job_container_uuid () {
33-
CONTAINER_ID=$(/var/vcap/packages/postgres/bin/psql -t -c "select vm_cid from instances WHERE id = '$1';" bosh | awk '$1=$1')
33+
CONTAINER_ID=$(/var/vcap/packages/postgres/bin/psql -U vcap -t -c "select vm_cid from instances WHERE id = '$1';" bosh | awk '$1=$1')
3434
}
3535

3636
get_deployment_id() {
37-
DEPLOYMENT_ID=$(/var/vcap/packages/postgres/bin/psql -t -c "select id from deployments where name = '$1';" bosh | awk '$1=$1')
37+
DEPLOYMENT_ID=$(/var/vcap/packages/postgres/bin/psql -U vcap -t -c "select id from deployments where name = '$1';" bosh | awk '$1=$1')
3838
}
3939

4040
if [[ "$1" = "deployments" ]]; then

0 commit comments

Comments
 (0)