diff --git a/scripts/upgrade b/scripts/upgrade index 6aa0550..e6161fd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -80,27 +80,27 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=2 - # Create a temporary directory - tmpdir="$(mktemp -d)" + # # Create a temporary directory + # tmpdir="$(mktemp -d)" - # Backup the config file in the temp dir - cp -ar "$final_path/groups" "$tmpdir/groups" - cp -ar "$final_path/data/passwd" "$tmpdir/passwd" + # # Backup the config file in the temp dir + # cp -ar "$final_path/groups" "$tmpdir/groups" + # cp -ar "$final_path/data/passwd" "$tmpdir/passwd" - # Remove the app directory securely - ynh_secure_remove --file="$final_path" + # # Remove the app directory securely + # ynh_secure_remove --file="$final_path" - ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" + ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" --keep="$final_path/groups $final_path/data/passwd" - # Create data and groups folder - mkdir -p "$final_path/data" "$final_path/groups" + # # Create data and groups folder + # mkdir -p "$final_path/data" "$final_path/groups" - # Copy the admin saved settings from tmp directory to final path - cp -ar "$tmpdir/groups" "$final_path/groups" - cp -ar "$tmpdir/passwd" "$final_path/data/passwd" + # # Copy the admin saved settings from tmp directory to final path + # cp -ar "$tmpdir/groups" "$final_path/groups" + # cp -ar "$tmpdir/passwd" "$final_path/data/passwd" - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + # # Remove the tmp directory securely + # ynh_secure_remove --file="$tmpdir" fi chmod 750 "$final_path"