#!/bin/sh
# config maintainer script for diaspora-installer
 
set -e

# source debconf stuff
. /usr/share/debconf/confmodule

# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
   . /usr/share/dbconfig-common/dpkg/config.pgsql

   dbc_dbname="diaspora_production"
   dbc_dbuser="diaspora"

   dbc_go diaspora-installer $@
fi

# What is your pod address?
db_input high diaspora-installer/url || true
db_go

# Configure pod address.
db_get diaspora-installer/url

/usr/lib/diaspora-common/scripts/set-env-nginx.sh $RET

if [ "$RET" = "false" ]; then
    db_go
fi

