Uninstall both CKAN databases

This commit is contained in:
Disassembler 2018-10-28 08:27:36 +01:00
parent 0a32d9ed9d
commit 5e4dbd6adf
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -11,7 +11,7 @@ rc-update -u
# Drop database and user
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
echo 'DROP DATABASE ckan; DROP ROLE ckan;' | lxc-attach -u 5432 -g 5432 postgres -- psql
echo 'DROP DATABASE ckan; DROP DATABASE ckan_datastore; DROP ROLE ckan; DROP ROLE ckan_datastore;' | lxc-attach -u 5432 -g 5432 postgres -- psql
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
# Remove redis data