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,
"services": [
"python"
"nginx",
"mopidy"
],
"arguments": {
"install" : [

View file

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