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 #90 from Lab-8916100448256/testing

feat(yunohost extension): Add a post app install hook to update app list
This commit is contained in:
Florian 2024-06-11 12:48:26 +02:00 committed by GitHub
commit 8fc8b780fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
sudo -u __USER__ bash -c "cd __INSTALL_DIR__ && ./yeswicli importer:sync -s yunohost-cli"

View file

@ -99,6 +99,9 @@ chmod +x $install_dir/tools/yunohost/private/scripts/*.sh
# Add app user in sudoers to authorize to launch yunohost cli commands without password
ynh_add_config --template="sudoers" --destination="/etc/sudoers.d/$app"
chown root:root /etc/sudoers.d/$app
ynh_add_config --template="sync_app_importer.sh" --destination="/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
# At last, run the YunoHost app importer
ynh_script_progression --message="Import YunoHost apps in bazar" --weight=2