mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
find ... chmod is not faster, at least avoid to chown -R the data_dir in the upgrade script
This commit is contained in:
parent
8d682cbdbc
commit
706d5071c6
3 changed files with 9 additions and 12 deletions
|
@ -64,8 +64,8 @@ exec_occ() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set write access for the following commands
|
# Set write access for the following commands
|
||||||
find "$install_dir" -not \( -user $app -and -group www-data \) -exec chown $app:www-data {} \+
|
chown -R $app:www-data "$install_dir"
|
||||||
find "$data_dir" -not \( -user $app -and -group $app \) -exec chown $app: {} \+
|
chown -R $app: "$data_dir"
|
||||||
|
|
||||||
# Define password in an intermediate var
|
# Define password in an intermediate var
|
||||||
# The fact that it's called _password allows it to be
|
# The fact that it's called _password allows it to be
|
||||||
|
@ -235,8 +235,8 @@ ynh_multimedia_addaccess $app
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
find "$install_dir" -not \( -user $app -and -group www-data \) -exec chown $app:www-data {} \+
|
chown -R $app:www-data "$install_dir"
|
||||||
find "$data_dir" -not \( -user $app -and -group $app \) -exec chown $app: {} \+
|
chown -R $app: "$data_dir"
|
||||||
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
|
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
|
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
|
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
|
|
|
@ -79,8 +79,8 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
find "$install_dir" -not \( -user $app -and -group www-data \) -exec chown $app:www-data {} \+
|
chown -R $app:www-data "$install_dir"
|
||||||
find "$data_dir" -not \( -user $app -and -group $app \) -exec chown $app: {} \+
|
chown -R $app: "$data_dir"
|
||||||
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
|
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
|
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
|
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
|
|
|
@ -138,8 +138,7 @@ then
|
||||||
ynh_script_progression --message="Upgrading $app..." --weight=3
|
ynh_script_progression --message="Upgrading $app..." --weight=3
|
||||||
|
|
||||||
# Set write access for the following commands
|
# Set write access for the following commands
|
||||||
find "$install_dir" -not \( -user $app -and -group www-data \) -exec chown $app:www-data {} \+
|
chown -R $app:www-data "$install_dir"
|
||||||
find "$data_dir" -not \( -user $app -and -group $app \) -exec chown $app: {} \+
|
|
||||||
|
|
||||||
# Print the current version number of Nextcloud
|
# Print the current version number of Nextcloud
|
||||||
exec_occ -V
|
exec_occ -V
|
||||||
|
@ -208,8 +207,7 @@ then
|
||||||
mv "$tmpdir" "$install_dir"
|
mv "$tmpdir" "$install_dir"
|
||||||
|
|
||||||
# Set write access for the following commands
|
# Set write access for the following commands
|
||||||
find "$install_dir" -not \( -user $app -and -group www-data \) -exec chown $app:www-data {} \+
|
chown -R $app:www-data "$install_dir"
|
||||||
find "$data_dir" -not \( -user $app -and -group $app \) -exec chown $app: {} \+
|
|
||||||
|
|
||||||
# Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3)
|
# Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3)
|
||||||
exec_occ maintenance:mode --off
|
exec_occ maintenance:mode --off
|
||||||
|
@ -326,8 +324,7 @@ fi
|
||||||
ynh_script_progression --message="Reapplying file permissions..." --weight=2
|
ynh_script_progression --message="Reapplying file permissions..." --weight=2
|
||||||
|
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
find "$install_dir" -not \( -user $app -and -group www-data \) -exec chown $app:www-data {} \+
|
chown -R $app:www-data "$install_dir"
|
||||||
find "$data_dir" -not \( -user $app -and -group $app \) -exec chown $app: {} \+
|
|
||||||
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
|
find $install_dir/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
|
find $install_dir/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
|
find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
|
|
Loading…
Add table
Reference in a new issue