add db seed

This commit is contained in:
Sebastian Hugentobler 2016-07-13 17:27:37 +02:00
parent d06b724690
commit 95c716f678
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
$config = array();
$config['db_dsnw'] = '{{getenv "DATABASEDSN"}}';
$config['db_dsnw'] = 'pgsql://{{getenv "DBUSER"}}:{{getenv "DBPASSWORD"}}@{{getenv "DBHOST"}}/DBNAME';
$config['log_driver'] = 'syslog';
$config['default_host'] = '{{getenv "IMAPHOST"}}';

View File

@ -1,8 +1,8 @@
#!/usr/bin/with-contenv sh
#PGPASSWORD=$DBPASSWORD psql -h $DBHOST -U $DBUSER -d $DBNAME -c "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'nc_appconfig')" | grep f
PGPASSWORD=$DBPASSWORD psql -h $DBHOST -U $DBUSER -d $DBNAME -c "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'session')" | grep f
if [ $? -ne 1 ]; then
PGPASSWORD=$DBPASSWORD psql -h $DBHOST -U $DBUSER -d $DBNAME -f /var/lib/roundcube/SQL/postgres.initial.sql
fi