From 6521e1a56d8556fa07c4dfa286e1f7712a1e3178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 26 Mar 2024 22:01:44 +0100 Subject: [PATCH] fix upgrade --- scripts/upgrade | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0e66a9d..f182b7a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -80,21 +80,15 @@ ynh_backup_if_checksum_is_different --file="$install_dir/htdocs/conf/conf.php" ynh_store_file_checksum --file="$install_dir/htdocs/conf/conf.php" chmod 644 "$install_dir/htdocs/conf/conf.php" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Set permissions on app files -if [ ! -f "$data_dir/install.lock" ]; then - echo 'This is a lock file to prevent use of install pages (set with permission 440)' > "$data_dir/install.lock" - chown $app:$app "$data_dir/install.lock" - chmod 440 "$data_dir/install.lock" +if [ ! -f "$install_dir/documents/install.lock" ]; then + echo 'This is a lock file to prevent use of install pages (set with permission 440)' > "$install_dir/documents/install.lock" + chown "$app:$app" "$install_dir/documents/install.lock" + chmod 440 "$install_dir/documents/install.lock" fi chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" # mkdir -p "$data_dir" # chown -R $app: "$data_dir"