From a18d1a701dceaf7e0a4c5cfb114907aad2233a4e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 21 Apr 2021 23:35:59 +0200 Subject: [PATCH] Fix import link --- README.md | 4 ++-- conf/env.prod | 2 +- conf/nginx.conf | 3 --- scripts/upgrade | 8 ++++++++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 995a54d..5d3d9d0 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,9 @@ Installation requires a dedicated domain or subdomain. Installing in a subpath i The admin uses the login you provided at installation. The password is the same you use for YunoHost. The admin interface is accessible at the address: `your.domain.fr/api/admin` -To add a collection of music files to a library in your YunoHost installation of Funkwhale, create a symlink to your collection titled "import" in `/var/www/funkwhale` +To add a collection of music files to a library in your YunoHost installation of Funkwhale, create a symlink to your collection titled "music" in `/home/yunohost.app/funkwhale/data` ```console -foo@bar:~$sudo ln -s /your/music/collection /var/www/funkwhale/import +foo@bar:~$sudo ln -s /your/music/collection /home/yunohost.app/funkwhale/data/music ``` The files can then be added to your library from the *uploading* tab in a music library under the heading **Import music from your server**. diff --git a/conf/env.prod b/conf/env.prod index 53887a3..87a3eb9 100644 --- a/conf/env.prod +++ b/conf/env.prod @@ -137,7 +137,7 @@ RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:0062dc16a22b41679cd5765e5342f # # MUSIC_DIRECTORY_SERVE_PATH= # stays commented, not needed MUSIC_DIRECTORY_PATH=__DATADIR__/music -MUSIC_DIRECTORY_SERVE_PATH=__DATADIR__/music +#MUSIC_DIRECTORY_SERVE_PATH=__DATADIR__/import # LDAP settings # Use the following options to allow authentication on your Funkwhale instance diff --git a/conf/nginx.conf b/conf/nginx.conf index 3ffa7c1..3cc4058 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -24,9 +24,6 @@ location / { # this is needed if you have file import via upload enabled client_max_body_size 100M; proxy_pass http://127.0.0.1:__PORT__/; - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; } location /front/ { diff --git a/scripts/upgrade b/scripts/upgrade index 8116e84..aa21fd0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,13 +125,21 @@ if [ -z "$datadir" ]; then if [ -d "$final_path/media/" ]; then rsync -a $final_path/media/ $datadir/media/ fi + if [ -d "$final_path/code/data/media/" ]; then + rsync -a $final_path/code/data/media/ $datadir/media/ + fi if [ -d "$final_path/import/" ]; then rsync -a $final_path/import/ $datadir/music/ fi + if [ -d "$final_path/code/data/music/" ]; then + rsync -a $final_path/code/data/music/ $datadir/music/ + fi ynh_secure_remove --file="$final_path/code" ynh_secure_remove --file="$final_path/media" + ynh_secure_remove --file="$final_path/code/data/media" ynh_secure_remove --file="$final_path/import" + ynh_secure_remove --file="$final_path/code/data/music" ynh_app_setting_set --app=$app --key=datadir --value=$datadir