1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Don't use /tmp anymore

This commit is contained in:
Maniack Crudelis 2018-06-24 19:20:13 +02:00 committed by GitHub
parent dc2c104242
commit c046535b4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,7 +189,7 @@ do
ynh_replace_string "__SHA256_SUM__" "$nextcloud_source_sha256" "../conf/app.src" ynh_replace_string "__SHA256_SUM__" "$nextcloud_source_sha256" "../conf/app.src"
# Create a temporary directory # Create a temporary directory
tmpdir=$(mktemp -d) tmpdir="${final_path}_temp_upgrade_dir"
# Install the next nextcloud version in $tmpdir # Install the next nextcloud version in $tmpdir
ynh_setup_source "$tmpdir" ynh_setup_source "$tmpdir"
@ -208,6 +208,7 @@ do
# Replace the old nextcloud by the new one # Replace the old nextcloud by the new one
ynh_secure_remove "$final_path" ynh_secure_remove "$final_path"
mv "$tmpdir" "$final_path" mv "$tmpdir" "$final_path"
ynh_secure_remove "$tmpdir"
# Set write access for the following commands # Set write access for the following commands
chown -R $app: "$final_path" "$datadir" chown -R $app: "$final_path" "$datadir"