mirror of
https://github.com/YunoHost-Apps/audiobookshelf_ynh.git
synced 2024-09-03 18:06:19 +02:00
Fix datadir
This commit is contained in:
parent
3606d0b205
commit
d9487bfeb9
1 changed files with 13 additions and 0 deletions
|
@ -58,6 +58,19 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# If datadir doesn't exist, create it
|
||||
if [ -z $datadir ]; then
|
||||
datadir=/home/yunohost.app/$app
|
||||
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||
mkdir -p $datadir
|
||||
rsync -arz "$final_path/config/" "$datadir/config/" --delete-after --remove-source-files
|
||||
rsync -arz "$final_path/audiobooks/" "$datadir/audiobooks/" --delete-after --remove-source-files
|
||||
rsync -arz "$final_path/metadata/" "$datadir/metadata/" --delete-after --remove-source-files
|
||||
chmod 750 "$datadir"
|
||||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:$app "$datadir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue