1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kavita_ynh.git synced 2024-09-03 19:26:30 +02:00

Merge pull request #18 from OniriCorpe/fix-arch-migration

Fix arch migration
This commit is contained in:
OniriCorpe 2023-09-29 19:52:01 +02:00 committed by GitHub
commit 8323b6f86c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,24 @@ chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app":www-data "$install_dir"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
# compare if the system arch is different from the binary arch
# if so, download the correct binary
if [ "$(uname -m)" != "$(file "$final_path"/Kavita | cut -d ',' -f 2 | tr -d ' ')" ]
then
ynh_script_progression --message="Migrating binary architecture..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="config/appsettings.json"
fi
chmod -R o-rwx "$install_dir"
chown -R "$app":www-data "$install_dir"
chmod +x "$install_dir"/Kavita
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================