From a2d777ddf4bac73a210ad890439bfbb069b0d8ce Mon Sep 17 00:00:00 2001 From: Simon Mellerin Date: Fri, 22 Dec 2023 18:22:03 +0100 Subject: [PATCH] Fix install relative path --- conf/aeneria.cron | 4 ++-- conf/nginx.conf | 2 +- scripts/install | 6 +++--- scripts/upgrade | 6 +++--- sources/patches/app-00-ldap-auth.patch | 16 ++++++++-------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/conf/aeneria.cron b/conf/aeneria.cron index cd76412..66f1fc9 100644 --- a/conf/aeneria.cron +++ b/conf/aeneria.cron @@ -1,2 +1,2 @@ -__MINUTES__ __HOUR__-23/3 * * * __APP__ /usr/bin/php__PHPVERSION__ __INSTALL_DIR__/app/bin/console aeneria:fetch-data -*/15 * * * * __APP__ /usr/bin/php__PHPVERSION__ __INSTALL_DIR__/app/bin/console aeneria:pending-action:process-expired +__MINUTES__ __HOUR__-23/3 * * * __APP__ /usr/bin/php__PHPVERSION__ __INSTALL_DIR__/bin/console aeneria:fetch-data +*/15 * * * * __APP__ /usr/bin/php__PHPVERSION__ __INSTALL_DIR__/bin/console aeneria:pending-action:process-expired diff --git a/conf/nginx.conf b/conf/nginx.conf index 88f164e..ddda443 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/app/public/; + alias __INSTALL_DIR__/public/; client_body_timeout 60m; proxy_read_timeout 60m; diff --git a/scripts/install b/scripts/install index 74fd115..1fa354e 100644 --- a/scripts/install +++ b/scripts/install @@ -45,10 +45,10 @@ ynh_add_fpm_config #================================================= ynh_script_progression --message="Configuring $app..." --weight=1 -ynh_add_config --template=".env" --destination="$install_dir/app/.env" +ynh_add_config --template=".env" --destination="$install_dir/.env" # Restrict rights to aeneria user only -chmod 600 "$install_dir/app/.env" +chmod 600 "$install_dir/.env" #================================================= # INSTALL AENERIA @@ -56,7 +56,7 @@ chmod 600 "$install_dir/app/.env" ynh_script_progression --message="Installing aeneria..." --weight=1 # Install aeneria -pushd $install_dir/app +pushd $install_dir ynh_exec_as $app php$phpversion bin/console aeneria:install "$app" -n # Create admin user mail=$(ynh_user_get_info --username="$admin" --key='mail') diff --git a/scripts/upgrade b/scripts/upgrade index 79ec4fd..0b59468 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,10 +79,10 @@ chmod 644 "/etc/cron.d/$app" #================================================= ynh_script_progression --message="Configuring $app..." --weight=1 -ynh_add_config --template=".env" --destination="$install_dir/app/.env" +ynh_add_config --template=".env" --destination="$install_dir/.env" # Restrict rights to aeneria user only -chmod 600 "$install_dir/app/.env" +chmod 600 "$install_dir/.env" #================================================= # UPGRADE AENERIA @@ -90,7 +90,7 @@ chmod 600 "$install_dir/app/.env" ynh_script_progression --message="Upgrading $app..." --weight=1 # Install dependencies and aeneria -pushd $install_dir/app +pushd $install_dir ynh_exec_as $app php$phpversion bin/console cache:clear -n ynh_exec_as $app php$phpversion bin/console doctrine:migrations:migrate -n diff --git a/sources/patches/app-00-ldap-auth.patch b/sources/patches/app-00-ldap-auth.patch index 20042b8..77aca71 100644 --- a/sources/patches/app-00-ldap-auth.patch +++ b/sources/patches/app-00-ldap-auth.patch @@ -4,10 +4,10 @@ Date: Fri Dec 22 17:22:41 2023 +0100 Yunohost ldap -diff --git a/app/config/packages/security.yaml b/app/config/packages/security.yaml +diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 6c4457f1..ea1f3dc9 100644 ---- a/app/config/packages/security.yaml -+++ b/app/config/packages/security.yaml +--- a/config/packages/security.yaml ++++ b/config/packages/security.yaml @@ -11,6 +11,8 @@ security: entity: class: App\Entity\User @@ -28,10 +28,10 @@ index 6c4457f1..ea1f3dc9 100644 logout: path: security.logout target: security.login -diff --git a/app/config/services.yaml b/app/config/services.yaml +diff --git a/config/services.yaml b/config/services.yaml index 4410bfc5..71b9ba86 100644 ---- a/app/config/services.yaml -+++ b/app/config/services.yaml +--- a/config/services.yaml ++++ b/config/services.yaml @@ -105,3 +105,16 @@ services: Aeneria\GrdfAdictApi\Client\GrdfAdictClientInterface: @@ -49,11 +49,11 @@ index 4410bfc5..71b9ba86 100644 + class: Symfony\Component\Ldap\Adapter\ExtLdap\Adapter + arguments: + - host: "localhost" -diff --git a/app/src/Security/YunohostLdapUserProvider.php b/app/src/Security/YunohostLdapUserProvider.php +diff --git a/src/Security/YunohostLdapUserProvider.php b/src/Security/YunohostLdapUserProvider.php new file mode 100644 index 00000000..09ad20c6 --- /dev/null -+++ b/app/src/Security/YunohostLdapUserProvider.php ++++ b/src/Security/YunohostLdapUserProvider.php @@ -0,0 +1,102 @@ +