mirror of
https://github.com/YunoHost-Apps/redmine_ynh.git
synced 2024-09-03 20:16:16 +02:00
cleaning
This commit is contained in:
parent
d11e55de34
commit
1fcae428ea
3 changed files with 19 additions and 1 deletions
13
conf/db-ldap.sql
Normal file
13
conf/db-ldap.sql
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
INSERT INTO public.auth_sources(type, name, host, port, base_dn, attr_login, attr_firstname, attr_lastname, attr_mail, onthefly_register, filter) VALUES (
|
||||||
|
'AuthSourceLdap',
|
||||||
|
'yunohost',
|
||||||
|
'localhost',
|
||||||
|
389,
|
||||||
|
'ou=users,dc=yunohost,dc=org',
|
||||||
|
'uid',
|
||||||
|
'givenName',
|
||||||
|
'sn',
|
||||||
|
'mail',
|
||||||
|
TRUE,
|
||||||
|
'(&(objectclass=posixAccount)(permission=cn=redmine.main,ou=permission,dc=yunohost,dc=org))'
|
||||||
|
)
|
|
@ -54,6 +54,8 @@ ynh_add_config --template="../conf/configuration.yml.example" --destination="$in
|
||||||
chmod 400 "$install_dir/config/configuration.yml"
|
chmod 400 "$install_dir/config/configuration.yml"
|
||||||
chown $app:$app "$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"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BUILD APP
|
# BUILD APP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Checking version..." --weight=1
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
|
@ -76,6 +75,10 @@ pushd $install_dir
|
||||||
ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
|
ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
#Setting up LDAP authentification
|
||||||
|
ynh_psql_connect_as $db_user $db_pwd $db_name < $install_dir/config/db-ldap.sql
|
||||||
|
rm -f $install_dir/config/db-ldap.sql
|
||||||
|
|
||||||
chmod 750 "$install_dir/public"
|
chmod 750 "$install_dir/public"
|
||||||
chmod -R o-rwx "$install_dir/public"
|
chmod -R o-rwx "$install_dir/public"
|
||||||
chown -R $app:www-data "$install_dir/public"
|
chown -R $app:www-data "$install_dir/public"
|
||||||
|
|
Loading…
Reference in a new issue