diff --git a/conf/config.yml b/conf/config.yml index 79a41cc..f80e62e 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -10,7 +10,7 @@ service: # The base path on the file system where the binary and assets are. # Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder # with a config file which will then be used. - rootpath: "__FINALPATH__/vikunja" + rootpath: "/opt/vikunja/" # The max number of items which can be returned per page maxitemsperpage: 50 # Enable the caldav endpoint, see the docs for more details @@ -44,7 +44,7 @@ database: # Database type to use. Supported types are mysql, postgres and sqlite. type: "postgres" # Database user which is used to connect to the database. - user: "__DB_NAME__" + user: "__DB_USER__" # Database password password: "__DB_PWD__" # Database host diff --git a/scripts/install b/scripts/install index ea047b6..0ea25b8 100644 --- a/scripts/install +++ b/scripts/install @@ -85,9 +85,10 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_name --db_name=$db_name +ynh_psql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -104,9 +105,6 @@ mkdir -p "$final_path/files" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -chown -R root:root "$final_path/vikunja" -chmod +x "$final_path/vikunja/vikunja" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE