mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Correct Restore script
This commit is contained in:
parent
943ddf8b12
commit
44f0706c9a
2 changed files with 13 additions and 4 deletions
|
@ -5,8 +5,12 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
if [ ! -e _common.sh ]; then
|
||||||
source ../settings/scripts/_common.sh
|
# Get the _common.sh file if it's not in the current directory
|
||||||
|
cp ../settings/scripts/_common.sh ./_common.sh
|
||||||
|
chmod a+rx _common.sh
|
||||||
|
fi
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -6,7 +6,12 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source ../settings/scripts/_common.sh
|
if [ ! -e _common.sh ]; then
|
||||||
|
# Get the _common.sh file if it's not in the current directory
|
||||||
|
cp ../settings/scripts/_common.sh ./_common.sh
|
||||||
|
chmod a+rx _common.sh
|
||||||
|
fi
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -124,7 +129,7 @@ else
|
||||||
fi
|
fi
|
||||||
#Check if metadata.db file exists. If not create it (empty library)
|
#Check if metadata.db file exists. If not create it (empty library)
|
||||||
if [ ! -e "$calibre_dir"/metadata.db ]; then
|
if [ ! -e "$calibre_dir"/metadata.db ]; then
|
||||||
cp -a ../conf/metadata.db.empty $calibre_dir/metadata.db
|
cp -a ../settings/conf/metadata.db.empty $calibre_dir/metadata.db
|
||||||
chown $app:$app $calibre_dir/*
|
chown $app:$app $calibre_dir/*
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue