1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yeswiki_ynh.git synced 2024-09-03 18:05:56 +02:00

Merge pull request #95 from Lab-8916100448256/testing

Add yunohost_sso_domain config param during upgrade if it does not exists
This commit is contained in:
Florian 2024-06-14 15:17:16 +02:00 committed by GitHub
commit 8132d9fdb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,10 +86,13 @@ ynh_add_config --template="sync_app_importer.sh" --destination="/etc/yunohost/ho
chown root:root /etc/yunohost/hooks.d/post_app_install/${app}_sync_app_importer.sh chown root:root /etc/yunohost/hooks.d/post_app_install/${app}_sync_app_importer.sh
chmod +x /etc/yunohost/hooks.d/post_app_install/${app}_sync_app_importer.sh chmod +x /etc/yunohost/hooks.d/post_app_install/${app}_sync_app_importer.sh
# ToDo : Add importer config in wakka.config.php if it is not already there ? # ToDo : Add app importer config in wakka.config.php if it is not already there ?
# if [ ??? ]; then
# ynh_replace_string --match_string=");" --replace_string=" 'dataSources' => [\n'yunohost-cli' => [\n'formId' => '5', // form id used in local bazar\n'lang' > if [ $(grep yunohost_sso_domain "$install_dir/wakka.config.php" | wc -l) = "0" ]; then
# fi SSO_DOMAIN=$(yunohost domain main-domain | sed -e 's/.*: //')
ynh_replace_string --match_string=");" --replace_string=" 'yunohost_sso_domain' => '${SSO_DOMAIN}',\n);" --target_file="$install_dir/wakka.config.php"
fi
# At last, run the YunoHost app importer # At last, run the YunoHost app importer
ynh_script_progression --message="Import YunoHost apps in bazar" --weight=2 ynh_script_progression --message="Import YunoHost apps in bazar" --weight=2