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

backup of /var/data during upgrade

This commit is contained in:
yalh76 2020-04-19 15:08:55 +02:00
parent 53b9baa0a5
commit 16c3f10152

View file

@ -105,9 +105,8 @@ then
if [ -d $final_path/var/invoices ]; then
cp -af "$final_path/var/invoices" "$tmpdir/."
fi
if [ -f $final_path/var/data/kimai.sqlite ]; then
cp -a "$final_path/var/data/kimai.sqlite" "$tmpdir/."
ynh_app_setting_set $app database "sqlite"
if [ -d $final_path/var/data ]; then
cp -af "$final_path/var/data" "$tmpdir/."
fi
# Download, check integrity, uncompress and patch the source from app.src
@ -120,8 +119,8 @@ then
if [ -d $tmpdir/invoices ]; then
cp -af "$tmpdir/invoices" "$final_path/var/."
fi
if [ -f $tmpdir/kimai.sqlite ]; then
sudo cp -af "$tmpdir/kimai.sqlite" "$final_path/var/data/."
if [ -d $tmpdir/data ]; then
cp -af "$tmpdir/data" "$final_path/var/."
fi
ynh_secure_remove --file="$tmpdir"