Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jobs/postgres-10/monit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check process postgres
with pidfile /var/vcap/sys/run/bpm/postgres-10/postgres-10.pid
start program "/var/vcap/jobs/bpm/bin/bpm start postgres-10" with timeout 300 seconds
stop program "/var/vcap/jobs/bpm/bin/bpm stop postgres-10"
stop program "/var/vcap/jobs/postgres-10/bin/bpm-stop-postgres"
group vcap
1 change: 1 addition & 0 deletions jobs/postgres-10/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ templates:
create-database.erb: bin/create-database
postgres.erb: bin/postgres
postgresql.conf.erb: config/postgresql.conf
bpm-stop-postgres: bin/bpm-stop-postgres

packages:
- postgres-10
Expand Down
8 changes: 8 additions & 0 deletions jobs/postgres-10/templates/bpm-stop-postgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e -o pipefail

postgres_pid=$(/var/vcap/packages/bpm/bin/bpm pid postgres-10)
kill -s SIGINT "${postgres_pid}"

/var/vcap/jobs/bpm/bin/bpm stop postgres-10
2 changes: 1 addition & 1 deletion jobs/postgres-9.4/monit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check process postgres
with pidfile /var/vcap/sys/run/bpm/postgres-9.4/postgres-9.4.pid
start program "/var/vcap/jobs/bpm/bin/bpm start postgres-9.4" with timeout 300 seconds
stop program "/var/vcap/jobs/bpm/bin/bpm stop postgres-9.4"
stop program "/var/vcap/jobs/postgres-9.4/bin/bpm-stop-postgres"
group vcap
1 change: 1 addition & 0 deletions jobs/postgres-9.4/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ templates:
create-database.erb: bin/create-database
postgres.erb: bin/postgres
postgresql.conf.erb: config/postgresql.conf
bpm-stop-postgres: bin/bpm-stop-postgres

packages:
- postgres-9.4
Expand Down
8 changes: 8 additions & 0 deletions jobs/postgres-9.4/templates/bpm-stop-postgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e -o pipefail

postgres_pid=$(/var/vcap/packages/bpm/bin/bpm pid postgres-9.4)
kill -s SIGINT "${postgres_pid}"

/var/vcap/jobs/bpm/bin/bpm stop postgres-9.4
2 changes: 1 addition & 1 deletion jobs/postgres/monit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check process postgres
with pidfile /var/vcap/sys/run/bpm/postgres/postgres.pid
start program "/var/vcap/jobs/bpm/bin/bpm start postgres" with timeout 300 seconds
stop program "/var/vcap/jobs/bpm/bin/bpm stop postgres"
stop program "/var/vcap/jobs/postgres/bin/bpm-stop-postgres"
group vcap
1 change: 1 addition & 0 deletions jobs/postgres/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ templates:
create-database.erb: bin/create-database
postgres.erb: bin/postgres
postgresql.conf.erb: config/postgresql.conf
bpm-stop-postgres: bin/bpm-stop-postgres

packages:
- postgres-13
Expand Down
8 changes: 8 additions & 0 deletions jobs/postgres/templates/bpm-stop-postgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e -o pipefail

postgres_pid=$(/var/vcap/packages/bpm/bin/bpm pid postgres)
kill -s SIGINT "${postgres_pid}"

/var/vcap/jobs/bpm/bin/bpm stop postgres