mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
add conditions for pass tests if upgrade from none initialyzed app
This commit is contained in:
parent
3e0711191a
commit
dbcf117afb
1 changed files with 6 additions and 1 deletions
|
@ -33,7 +33,10 @@ fi
|
|||
# BACKUP SQLITE DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5
|
||||
|
||||
if [ -f "$install_dir/data/association.sqlite" ];then
|
||||
cp -a $install_dir/data/association.sqlite /tmp/
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -86,7 +89,9 @@ ynh_add_config --template="config.local.php" --destination="$install_dir/config.
|
|||
ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php"
|
||||
|
||||
# Restore the sqlite DB
|
||||
mv /tmp/association.sqlite $install_dir/data
|
||||
if [ -f "/tmp/association.sqlite" ];then
|
||||
mv /tmp/association.sqlite $install_dir/data
|
||||
fi
|
||||
|
||||
# Permissions on files and directories
|
||||
chmod -R o-rwx "$install_dir"
|
||||
|
|
Loading…
Add table
Reference in a new issue