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

feat(yunohost extension): Add a post app install hook to update app list

This commit is contained in:
Douze Bé 2024-05-26 15:44:16 +02:00
parent 3d20997a5b
commit dd03edae6d
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