1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mopidy_ynh.git synced 2024-09-03 19:46:21 +02:00

Fix package linter

This commit is contained in:
magikcypress 2017-03-10 23:09:42 +01:00
parent 89e1c1f55f
commit c69190b314
2 changed files with 10 additions and 16 deletions

View file

@ -18,7 +18,8 @@
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"python" "nginx",
"mopidy"
], ],
"arguments": { "arguments": {
"install" : [ "install" : [

View file

@ -3,25 +3,18 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
# The parameter $1 is the backup directory location dedicated to the app # Get multi-instances specific variables
backup_dir=$1
# The parameter $2 is theid of the app instance
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
domain=$(ynh_app_setting_get $app domain) # Retrieve app settings
final_path=$(ynh_app_setting_get $app final_path) domain=$(ynh_app_setting_get "$app" domain)
# Copy the app web files # Copy the app files
sudo mkdir -p ${backup_dir}/var/www final_path="/var/www/${app}"
sudo cp -a $final_path "${backup_dir}/var/www/$app" ynh_backup "$final_path" "sources" 1
# Copy the music files
sudo mkdir -p ${backup_dir}/var/lib/$app/
sudo cp -a $final_path "${backup_dir}/var/lib/$app"
# Copy the conf files # Copy the nginx conf files
sudo mkdir -p "${backup_dir}/conf" ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf "${backup_dir}/conf/nginx.conf"