1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redmine_ynh.git synced 2024-09-03 20:16:16 +02:00

Fix ldap, fix upgrade

This commit is contained in:
Salamandar 2024-02-24 12:59:43 +01:00
parent d34a818b86
commit dbcbd6f5c6
2 changed files with 6 additions and 5 deletions

View file

@ -44,10 +44,6 @@ ynh_add_config --template="configuration.yml.example" --destination="$install_di
chmod 400 "$install_dir/config/configuration.yml"
chown "$app:$app" "$install_dir/config/configuration.yml"
ynh_add_config --template="db-ldap.sql" --destination="$install_dir/config/db-ldap.sql"
ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$install_dir/config/db-ldap.sql"
ynh_secure_remove --file="$install_dir/config/db-ldap.sql"
#=================================================
# BUILD APP
#=================================================
@ -61,6 +57,11 @@ pushd "$install_dir"
#ynh_exec_warn_less bundle exec rake redmine:load_default_data RAILS_ENV=production
popd
# Setting up LDAP authentification
ynh_add_config --template="db-ldap.sql" --destination="$install_dir/config/db-ldap.sql"
ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$install_dir/config/db-ldap.sql"
ynh_secure_remove --file="$install_dir/config/db-ldap.sql"
#=================================================
# SYSTEM CONFIGURATION
#=================================================

View file

@ -32,7 +32,7 @@ ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/database.yml config/configuration.yml"
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/database.yml config/configuration.yml config/initializers/secret_token.rb"
mkdir -p "$install_dir/files" "$install_dir/log" "$install_dir/tmp" "$install_dir/public/plugin_assets"