diff --git a/scripts/install b/scripts/install index 3ad77d0..9686674 100755 --- a/scripts/install +++ b/scripts/install @@ -100,27 +100,31 @@ chown root:root /etc/sudoers.d/$app # Add a post app install hook to sync the app importer mkdir -p /etc/yunohost/hooks.d/post_app_install +chmod 700 /etc/yunohost/hooks.d/post_app_install 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 +chmod 700 /etc/yunohost/hooks.d/post_app_install/${app}_sync_app_importer.sh # Add a post app remove hook to sync the app importer mkdir -p /etc/yunohost/hooks.d/post_app_remove +chmod 700 /etc/yunohost/hooks.d/post_app_remove ynh_add_config --template="sync_app_importer.sh" --destination="/etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh" chown root:root /etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh -chmod +x /etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh +chmod 700 /etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh # Add a post user create hook to sync the user importer mkdir -p /etc/yunohost/hooks.d/post_user_create +chmod 700 /etc/yunohost/hooks.d/post_user_create ynh_add_config --template="sync_user_importer.sh" --destination="/etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh" chown root:root /etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh -chmod +x /etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh +chmod 700 /etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh # Add a post user delete hook to sync the user importer mkdir -p /etc/yunohost/hooks.d/post_user_delete +chmod 700 /etc/yunohost/hooks.d/post_user_delete ynh_add_config --template="sync_user_importer.sh" --destination="/etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh" chown root:root /etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh -chmod +x /etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh +chmod 700 /etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh # At last, run the YunoHost app importer ynh_script_progression --message="Import YunoHost apps in bazar" --weight=2 diff --git a/scripts/upgrade b/scripts/upgrade index 82a4daa..4590039 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,28 +82,31 @@ chown root:root /etc/sudoers.d/$app # Add a post app install hook to sync the app importer mkdir -p /etc/yunohost/hooks.d/post_app_install +chmod 700 /etc/yunohost/hooks.d/post_app_install 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 +chmod 700 /etc/yunohost/hooks.d/post_app_install/${app}_sync_app_importer.sh # Add a post app remove hook to sync the app importer mkdir -p /etc/yunohost/hooks.d/post_app_remove +chmod 700 /etc/yunohost/hooks.d/post_app_remove ynh_add_config --template="sync_app_importer.sh" --destination="/etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh" chown root:root /etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh -chmod +x /etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh +chmod 700 /etc/yunohost/hooks.d/post_app_remove/${app}_sync_app_importer.sh # Add a post user create hook to sync the user importer mkdir -p /etc/yunohost/hooks.d/post_user_create +chmod 700 /etc/yunohost/hooks.d/post_user_create ynh_add_config --template="sync_user_importer.sh" --destination="/etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh" chown root:root /etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh -chmod +x /etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh +chmod 700 /etc/yunohost/hooks.d/post_user_create/${app}_sync_user_importer.sh # Add a post user delete hook to sync the user importer mkdir -p /etc/yunohost/hooks.d/post_user_delete +chmod 700 /etc/yunohost/hooks.d/post_user_delete ynh_add_config --template="sync_user_importer.sh" --destination="/etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh" chown root:root /etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh -chmod +x /etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh - +chmod 700 /etc/yunohost/hooks.d/post_user_delete/${app}_sync_user_importer.sh if [ $(grep yunohost_sso_domain "$install_dir/wakka.config.php" | wc -l) = "0" ]; then