mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
Update upgrade
This commit is contained in:
parent
e3c10fb15c
commit
418e8ffc7a
1 changed files with 9 additions and 19 deletions
|
@ -17,12 +17,6 @@ timezone="$(cat /etc/timezone)"
|
||||||
secret=$(ynh_string_random --length=32)
|
secret=$(ynh_string_random --length=32)
|
||||||
redis_db=$(ynh_redis_get_free_db)
|
redis_db=$(ynh_redis_get_free_db)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -96,21 +90,17 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
# Frontend
|
||||||
then
|
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
|
||||||
|
|
||||||
# Frontend
|
# Backend
|
||||||
ynh_setup_source --dest_dir="$install_dir" --source_id="front"
|
mkdir -p "$backend_path/files"
|
||||||
|
tempdir="$(mktemp -d)"
|
||||||
# Backend
|
ynh_setup_source --dest_dir=$tempdir --source_id="back"
|
||||||
mkdir -p "$backend_path/files"
|
back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")"
|
||||||
tempdir="$(mktemp -d)"
|
cp "$back" "$backend_path/vikunja"
|
||||||
ynh_setup_source --dest_dir=$tempdir --source_id="back"
|
|
||||||
back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")"
|
|
||||||
cp "$back" "$backend_path/vikunja"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
Loading…
Reference in a new issue