mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
correct process upgrade
This commit is contained in:
parent
10b68c1ccb
commit
800941d411
1 changed files with 6 additions and 9 deletions
|
@ -34,9 +34,8 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5
|
ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5
|
||||||
|
|
||||||
if [ -f "$install_dir/data/association.sqlite" ];then
|
# keep a data directory backup
|
||||||
cp -a $install_dir/data/association.sqlite /tmp/
|
cp -R $install_dir/data /tmp/data
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -88,10 +87,8 @@ fi
|
||||||
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
||||||
ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php"
|
ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php"
|
||||||
|
|
||||||
# Restore the sqlite DB
|
# Sync the data directory backup
|
||||||
if [ -f "/tmp/association.sqlite" ];then
|
rsync /tmp/data/ $install_dir/data/
|
||||||
mv /tmp/association.sqlite $install_dir/data
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Permissions on files and directories
|
# Permissions on files and directories
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
|
@ -117,7 +114,7 @@ sleep 5
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
# remove directory duplicated
|
# remove data directory backup
|
||||||
ynh_secure_remove --file="$install_dir/data/data"
|
ynh_secure_remove --file="/tmp/data"
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||||
|
|
Loading…
Add table
Reference in a new issue