#!/bin/sh set -e ETC=/etc/cyborg CONF=${ETC}/cyborg.conf #PKGOS-INCLUDE# if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then . /usr/share/debconf/confmodule . /usr/share/dbconfig-common/dpkg/postinst pkgos_var_user_group cyborg # Make sure we have a /etc/cyborg folder with config files in it. pkgos_write_new_conf cyborg cyborg.conf pkgos_write_new_conf cyborg api-paste.ini pkgos_rabbit_write_conf ${CONF} oslo_messaging_rabbit cyborg pkgos_write_admin_creds ${CONF} keystone_authtoken cyborg # Do the db creation using dbconfig-common db_get cyborg/configure_db if [ "$RET" = "true" ] ; then pkgos_dbc_postinst ${CONF} database connection cyborg $@ echo "Now doing cyborg-dbsync: this may take a while..." su -s /bin/sh -c "cyborg-dbsync --config-file /etc/cyborg/cyborg.conf upgrade" cyborg || true fi db_stop fi #DEBHELPER# exit 0