mirror of
https://github.com/YunoHost-Apps/yeswiki_ynh.git
synced 2024-09-03 18:05:56 +02:00
Use stable version instead of git repository
This commit is contained in:
parent
5de5ee4dbb
commit
dafb9cc8f6
3 changed files with 41 additions and 5 deletions
|
@ -9,6 +9,8 @@ YNH_PHP_VERSION="7.3"
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
extra_php_dependencies="php${YNH_PHP_VERSION}-zip"
|
extra_php_dependencies="php${YNH_PHP_VERSION}-zip"
|
||||||
|
|
||||||
|
loginldap_version="2021-03-01-2"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -146,9 +146,16 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD AND CONFIGURE LDAP PLUGIN
|
# DOWNLOAD AND CONFIGURE LDAP PLUGIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Dowloading and configuring LDAP plugin" --weight=2
|
||||||
|
|
||||||
# Download as git repository
|
# Download from yeswiki repository
|
||||||
git clone https://github.com/YesWiki/yeswiki-extension-loginldap $final_path/tools/loginldap
|
wget https://repository.yeswiki.net/doryphore/extension-loginldap-$loginldap_version.zip
|
||||||
|
wget https://repository.yeswiki.net/doryphore/extension-loginldap-$loginldap_version.zip.md5
|
||||||
|
md5sum -c extension-loginldap-$loginldap_version.zip.md5 || ynh_die "Checksum for LDAP plugin does not match"
|
||||||
|
|
||||||
|
unzip extension-loginldap-$loginldap_version.zip -d $final_path/tools
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=loginldap_version --value=$loginldap_version
|
||||||
|
|
||||||
# Add config at the end of wakka.config.php
|
# Add config at the end of wakka.config.php
|
||||||
ynh_replace_string --match_string=");"\
|
ynh_replace_string --match_string=");"\
|
||||||
|
|
|
@ -84,9 +84,36 @@ then
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
cd $final_path/tools/loginldap
|
fi
|
||||||
git pull
|
|
||||||
cd -
|
if [ $(ynh_app_setting_get --app=$app --key=loginldap_version) != $loginldap_version ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Upgrading LDAP plugin..." --weight=3
|
||||||
|
|
||||||
|
# Download LDAP plugin from yeswiki repository
|
||||||
|
wget https://repository.yeswiki.net/doryphore/extension-loginldap-$loginldap_version.zip
|
||||||
|
wget https://repository.yeswiki.net/doryphore/extension-loginldap-$loginldap_version.zip.md5
|
||||||
|
md5sum -c extension-loginldap-$loginldap_version.zip.md5 || ynh_die "Checksum for LDAP plugin does not match"
|
||||||
|
|
||||||
|
unzip -o extension-loginldap-$loginldap_version.zip -d $final_path/tools
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=loginldap_version --value=$loginldap_version
|
||||||
|
|
||||||
|
if ! grep -q "ldap_host" "$final_path/wakka.config.php"
|
||||||
|
then
|
||||||
|
# Add LDAP config at the end of wakka.config.php
|
||||||
|
ynh_replace_string --match_string=");"\
|
||||||
|
--replace_string=" 'ldap_host' => '127.0.0.1',\n);"\
|
||||||
|
--target_file="$final_path/wakka.config.php"
|
||||||
|
|
||||||
|
ynh_replace_string --match_string=");"\
|
||||||
|
--replace_string=" 'ldap_port' => '389',\n);"\
|
||||||
|
--target_file="$final_path/wakka.config.php"
|
||||||
|
|
||||||
|
ynh_replace_string --match_string=");"\
|
||||||
|
--replace_string=" 'ldap_base' => 'ou=users,dc=yunohost,dc=org'\n);"\
|
||||||
|
--target_file="$final_path/wakka.config.php"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue