2017-04-09 11:05:39 +02:00
|
|
|
|
|
|
|
function install_dependencies()
|
|
|
|
{
|
|
|
|
# Dependencies
|
2017-08-02 16:26:44 +02:00
|
|
|
ynh_install_app_dependencies gunicorn python-dev python-pip libldap2-dev libpq-dev libsasl2-dev libjpeg-dev libxml2-dev libxslt1-dev libffi-dev python-cairo libpango1.0-0 postgresql postgresql-contrib #libmysqlclient-dev
|
2017-04-09 11:05:39 +02:00
|
|
|
}
|
|
|
|
|
2017-08-02 16:26:44 +02:00
|
|
|
function init_db()
|
|
|
|
{
|
2018-12-20 23:05:20 +01:00
|
|
|
ynh_psql_test_if_first_run
|
2017-08-02 16:26:44 +02:00
|
|
|
# Generate random password
|
|
|
|
db_name=$app
|
|
|
|
db_user=$app
|
|
|
|
db_pwd=$(ynh_string_random)
|
|
|
|
# Initialize database and store pssql password for upgrade
|
|
|
|
ynh_psql_create_db $db_name $db_user $db_pwd
|
|
|
|
ynh_app_setting_set "$app" psqlpassword "$db_pwd"
|
|
|
|
}
|