Spotter-VM/postgres/setup/etc/init.d/postgres

16 lines
237 B
Plaintext
Executable File

#!/sbin/openrc-run
description="Postgres container"
start() {
lxc-start postgres
}
start_post() {
timeout -t 60 sh -c 'until lxc-attach postgres -- pg_isready >/dev/null 2>&1; do usleep 50000; done'
}
stop() {
lxc-stop postgres
}