From c3c84311cc8a48d9be858e5f72b21eaa685e8383 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 15 Sep 2021 11:46:07 +0200 Subject: [PATCH] Directly install LDAP plugin, no need for GPM --- conf/ldap.src | 7 +++++++ scripts/install | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 conf/ldap.src diff --git a/conf/ldap.src b/conf/ldap.src new file mode 100644 index 0000000..47d0af7 --- /dev/null +++ b/conf/ldap.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://github.com/trilbymedia/grav-plugin-login-ldap/archive/refs/tags/1.0.2.zip +SOURCE_SUM=BDAEA681730E800AB8EDA7EDF56D772BACA1DE783D0F8C321AC2EC86D82628CA +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=zip +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME=ldap.zip +SOURCE_EXTRACT=true diff --git a/scripts/install b/scripts/install index 63bce94..a039141 100644 --- a/scripts/install +++ b/scripts/install @@ -104,12 +104,14 @@ find "$final_path" -type d -exec chmod +s {} \; #================================================= ynh_script_progression --message="Installing and configuring LDAP plugin..." --weight=1 -pushd "$final_path" - exec_as $app php${YNH_PHP_VERSION} bin/gpm install login-ldap --no-interaction -popd +# Download LDAP source +ynh_setup_source --dest_dir="$final_path/user/plugins/login-ldap" --source_id="ldap" + +# Preparing config exec_as $app mkdir -p "$final_path/user/config/plugins/login-ldap" exec_as $app touch "$final_path/user/accounts/admin.yaml" +# Setting up config ynh_add_config --template="../conf/login-ldap.yaml" --destination="$final_path/user/config/plugins/login-ldap.yaml" chown $app:$app "$final_path/user/config/plugins/login-ldap.yaml" chmod 640 "$final_path/user/config/plugins/login-ldap.yaml"