mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Others var (#143)
* Upgrade to 1.1.1 (#138) * Update README.md * Test bump to 1.0 * Bump to Yunohost 4 (for Debian upgrade) * Test removal of nonexistent scripts * Correct Typo * Update README.md * Fix linter warnings * Fix linter * Fix linter warnings * Cleaning up * Update README.md * Update to 1.0.1 (#119) * Update to 1.0.1 * Set new permissions * Add French Readme * Readme update * Update README.md * Update README.md * Update README_fr.md * Update README.md Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Update README_fr.md Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Update README.md Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Update README_fr.md Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Finding an available port * Uprade to 1.1 and fixes Twisted by retrograding it (#129) * Fix linter warning : no need to use $is_public * Clarify custom paths needed to import collections of music files in Readme. (#134) * Update readme to indicate custom import path Yunohost installations of Funkwhale use a different path for file imports than those indicated in the Funkwhale documentation.. (/var/www/Funkwhale/import). We should therefore indicate to the admin user what that path is, and steps necessary to use it. Addresses #132. * Fix bash highlighting. * Update README.md Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Apply Example_ynh (#131) * Testing (#130) * Uprade to 1.1 and fixes Twisted by retrograding it (#129) * Apply example_ynh Fix #15 * Fix services * Fix several merging * Stick to official install process * fix path_transversal * Using option '--log_type systemd' with 'yunohost service add' is not relevant anymore * Try to fix package_check * Fix package_check test * Update check_process * Trying to fix package_check * Update env.prod * remove sleep * Better service name * missing datadir * line 111: upgrade_type: unbound variable * Implement --is_big * Fix stopping service from previous version * Fix upgrade * Fix upgrade * Apply example_ynh * Apply example_ynh * Fix rights * Update api.src * Update env.prod * Update front.src * Update manifest.json * Update README.md * Update README_fr.md * Fix chmod * Fix rights Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * Update conf/nginx.conf Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com> * Update conf/nginx.conf Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com> * fix * Fix rights for datadir from previous version * Update upgrade * Fix recursive chmod * Fix import link * Update README_fr.md Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> Co-authored-by: Ciarán Ainsworth <cda@rootkey.co.uk> Co-authored-by: Ciarán Ainsworth <ciaranainsworth@posteo.net> Co-authored-by: ericgaspar <junk.eg@free.fr> Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com> Co-authored-by: Amos Blanton <lightnin@users.noreply.github.com> * remove others_var * no more needed Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> Co-authored-by: Ciarán Ainsworth <cda@rootkey.co.uk> Co-authored-by: Ciarán Ainsworth <ciaranainsworth@posteo.net> Co-authored-by: ericgaspar <junk.eg@free.fr> Co-authored-by: Thomas <51749973+Thovi98@users.noreply.github.com> Co-authored-by: Amos Blanton <lightnin@users.noreply.github.com>
This commit is contained in:
parent
e75e325d96
commit
0e4482a2fd
5 changed files with 13 additions and 70 deletions
|
@ -19,7 +19,9 @@
|
|||
# 0.19.1
|
||||
upgrade=1 from_commit=4d4bf0981e2d3a00eaae6b19bd54344fe55d6530
|
||||
# 1.1~ynh1
|
||||
upgrade=1 from_commit=8172790fb461d16f09089593fdac380f0d499c83
|
||||
upgrade=1 from_commit=8172790fb461d16f09089593fdac380f0d499c83
|
||||
# 1.1.1~ynh1
|
||||
upgrade=1 from_commit=fa9587f61e4bb4f9db8667b1c6701ede37ac8e91
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
incorrect_path=0
|
||||
|
@ -34,3 +36,5 @@ Notification=all
|
|||
manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1
|
||||
; commit=8172790fb461d16f09089593fdac380f0d499c83
|
||||
name=1.1~ynh1
|
||||
; commit=fa9587f61e4bb4f9db8667b1c6701ede37ac8e91
|
||||
name=1.1.1~ynh1
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Modern, convivial and free music server",
|
||||
"fr": "Serveur de musique moderne, convivial et gratuit"
|
||||
},
|
||||
"version": "1.1.1~ynh1",
|
||||
"version": "1.1.1~ynh2",
|
||||
"url": "https://funkwhale.audio",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"maintainer": {
|
||||
|
@ -18,7 +18,7 @@
|
|||
"email": "jean-baptiste@holcroft.fr"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.3"
|
||||
"yunohost": ">= 4.2.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -63,64 +63,3 @@ ynh_redis_remove_db() {
|
|||
local db=$1
|
||||
redis-cli -n "$db" flushall
|
||||
}
|
||||
|
||||
# Send an email to inform the administrator
|
||||
#
|
||||
# usage: ynh_send_readme_to_admin app_message [recipients]
|
||||
# | arg: app_message - The message to send to the administrator.
|
||||
# | arg: recipients - The recipients of this email. Use spaces to separate multiples recipients. - default: root
|
||||
# example: "root admin@domain"
|
||||
# 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 information...}"
|
||||
local recipients="${2:-root}"
|
||||
|
||||
# Retrieve the email of users
|
||||
find_mails () {
|
||||
local list_mails="$1"
|
||||
local mail
|
||||
local recipients=" "
|
||||
# Read each mail in argument
|
||||
for mail in $list_mails
|
||||
do
|
||||
# Keep root or a real email address as it is
|
||||
if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@"
|
||||
then
|
||||
recipients="$recipients $mail"
|
||||
else
|
||||
# But replace an user name without a domain after by its email
|
||||
if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null)
|
||||
then
|
||||
recipients="$recipients $mail"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "$recipients"
|
||||
}
|
||||
recipients=$(find_mails "$recipients")
|
||||
|
||||
local mail_subject="☁️🆈🅽🅷☁️: \`$app\` was just installed!"
|
||||
|
||||
local mail_message="This is an automated message from your beloved YunoHost server.
|
||||
|
||||
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_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
|
||||
}
|
||||
|
|
|
@ -158,9 +158,9 @@ ynh_script_progression --message="Configuring a systemd service..."
|
|||
ynh_add_config --template="../conf/funkwhale.target" --destination="/etc/systemd/system/$app.target"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service" --others_var="datadir"
|
||||
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service" --others_var="datadir"
|
||||
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service" --others_var="datadir"
|
||||
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service"
|
||||
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service"
|
||||
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service"
|
||||
|
||||
#=================================================
|
||||
# INSTALL PYTHON DEPENDENCIES
|
||||
|
|
|
@ -265,9 +265,9 @@ ynh_script_progression --message="Upgrading systemd configuration..."
|
|||
ynh_add_config --template="../conf/funkwhale.target" --destination="/etc/systemd/system/$app.target"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service" --others_var="datadir"
|
||||
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service" --others_var="datadir"
|
||||
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service" --others_var="datadir"
|
||||
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service"
|
||||
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service"
|
||||
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Reference in a new issue