mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
commit
43d4feed7d
9 changed files with 37 additions and 19 deletions
|
@ -5,7 +5,7 @@ A modern, convivial and free music server on YunoHost
|
|||
|
||||
Installation requires a dedicated domain for now. I hope subpath installation will be possible in the future.
|
||||
|
||||
**Shipped version:** 0.15 (this is an Alpha version!)
|
||||
**Shipped version:** 0.16 (this is an Alpha version!)
|
||||
|
||||
## Admin
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=ddb98f0220b9da59bd41ca354247dd36ec8657dc
|
||||
upgrade=1 from_commit=11c81c1f503691272df5002dad8278bd82f34535
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
incorrect_path=0
|
||||
|
@ -39,6 +39,6 @@
|
|||
Email=jean-baptiste@holcroft.fr
|
||||
Notification=all
|
||||
;;; Upgrade options
|
||||
; commit=ddb98f0220b9da59bd41ca354247dd36ec8657dc
|
||||
name=Upgrade from 0.14.2
|
||||
; commit=11c81c1f503691272df5002dad8278bd82f34535
|
||||
name=Upgrade from 0.15~ynh2
|
||||
manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/0.15/download?job=build_front
|
||||
SOURCE_SUM=3989a94cdec9ab5ea62d395d0b683ea15e216a6ae9ccef8f48b56de71a57990f
|
||||
SOURCE_URL=https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/0.16/download?job=build_front
|
||||
SOURCE_SUM=771d74d8d2eff977ad6946900b00093de167f9b9cd1d2e9ca7001a0e372fa0be
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://code.eliotberriot.com/funkwhale/funkwhale/-/archive/0.15/funkwhale-0.15.tar.bz2
|
||||
SOURCE_SUM=a153ee377c573cc1f9963b72392c19d6a0dd30e32bdacde7e20467ff729722c1
|
||||
SOURCE_URL=https://code.eliotberriot.com/funkwhale/funkwhale/-/archive/0.16/funkwhale-0.16.tar.bz2
|
||||
SOURCE_SUM=a5e4628e9f27b0163d06101f34aefb8d376e54bc3d10660422894b64b3030e4e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.bz2
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
# FUNKWHALE_VERSION=latest
|
||||
|
||||
# In-place import, see https://code.eliotberriot.com/funkwhale/funkwhale/tags/0.10
|
||||
MUSIC_DIRECTORY_PATH=__FINALPATH__/data/music
|
||||
MUSIC_DIRECTORY_SERVE_PATH=__FINALPATH__/data/music
|
||||
MUSIC_DIRECTORY_PATH=/music
|
||||
|
||||
# General configuration
|
||||
# ---------------------
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"description": {
|
||||
"en": "A modern, convivial and free music server"
|
||||
},
|
||||
"version": "0.15~ynh2",
|
||||
"version": "0.16~ynh2",
|
||||
"url": "https://funkwhale.audio",
|
||||
"license": "BSD-3-Clause",
|
||||
"maintainer": {
|
||||
|
|
|
@ -213,7 +213,7 @@ ynh_psql_drop_user() {
|
|||
# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you
|
||||
# example: "root admin@domain user1 user2"
|
||||
ynh_send_readme_to_admin() {
|
||||
local app_message="${1:-...No specific informations...}"
|
||||
local app_message="${1:-...No specific information...}"
|
||||
local recipients="${2:-root}"
|
||||
|
||||
# Retrieve the email of users
|
||||
|
@ -243,12 +243,25 @@ ynh_send_readme_to_admin() {
|
|||
local mail_subject="☁️🆈🅽🅷☁️: \`$app\` was just installed!"
|
||||
|
||||
local mail_message="This is an automated message from your beloved YunoHost server.
|
||||
Specific informations for the application $app.
|
||||
|
||||
Specific information for the application $app.
|
||||
|
||||
$app_message
|
||||
|
||||
---
|
||||
Automatic diagnosis data from YunoHost
|
||||
|
||||
$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')"
|
||||
|
||||
# Define binary to use for mail command
|
||||
if [ -e /usr/bin/bsd-mailx ]
|
||||
then
|
||||
local mail_bin=/usr/bin/bsd-mailx
|
||||
else
|
||||
local mail_bin=/usr/bin/mail.mailutils
|
||||
fi
|
||||
|
||||
# Send the email to the recipients
|
||||
echo "$mail_message" | mail -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
|
||||
echo "$mail_message" | $mail_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
|
||||
}
|
||||
|
||||
|
|
|
@ -219,8 +219,8 @@ systemctl restart "$app".target
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R "$app": "$final_path"
|
||||
chmod -R 755 "$final_path/front/dist/"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -35,10 +35,6 @@ if [ -z "$redis_db" ]; then
|
|||
ynh_app_setting_set "$app" redis_db "$redis_db"
|
||||
fi
|
||||
|
||||
# We don't need backports anymore
|
||||
ynh_secure_remove /etc/apt/sources.list.d/stretch-backports.list
|
||||
ynh_secure_remove /etc/apt/sources.list.d/jessie-backports.list
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
@ -131,6 +127,9 @@ python3 -m venv "$final_path/virtualenv"
|
|||
pip install --upgrade setuptools
|
||||
pip install wheel
|
||||
pip install -r "${final_path}/api/requirements.txt"
|
||||
|
||||
# https://code.eliotberriot.com/funkwhale/funkwhale/tags/0.16
|
||||
pip uninstall django-cacheops --yes
|
||||
)
|
||||
|
||||
#=================================================
|
||||
|
@ -178,6 +177,11 @@ chmod +x "$final_path/load_env"
|
|||
ynh_psql_execute_as_root "ALTER USER $db_user WITH NOSUPERUSER;"
|
||||
|
||||
python api/manage.py collectstatic --clear --noinput
|
||||
|
||||
# https://code.eliotberriot.com/funkwhale/funkwhale/tags/0.16 # users-now-have-an-activitypub-actor-manual-action-required
|
||||
python api/manage.py script create_actors --no-input
|
||||
# https://code.eliotberriot.com/funkwhale/funkwhale/tags/0.16 #image-thumbnails-manual-action-required
|
||||
python api/manage.py script create_image_variations --no-input
|
||||
)
|
||||
|
||||
#=================================================
|
||||
|
@ -200,8 +204,8 @@ systemctl restart "$app".target
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set right permissions for curl installation
|
||||
chown -R "$app": "$final_path"
|
||||
chmod -R 755 "$final_path/front/dist/"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
Loading…
Reference in a new issue