1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ampache_ynh.git synced 2024-09-03 18:15:55 +02:00
ampache_ynh/scripts/upgrade
2017-09-03 20:28:47 +00:00

36 lines
766 B
Bash

#!/bin/bash
set -eu
. /usr/share/yunohost/helpers
. _common
# Retrieve arguments
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
path=$(ynh_app_setting_get $app path)
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
admin_ampache=$(ynh_app_setting_get $app admin)
path=$(ynh_normalize_url_path $path)
# Get sources and copy files to the right place
ampache_ynh_getsources
# Change variables in Ampache configuration
ampache_ynh_prepareconfig
# Modify Nginx configuration file and copy it to Nginx conf directory
ampache_ynh_preparenginx
# Ampache installation
ampache_ynh_install
# Reload Nginx and regenerate SSOwat conf
ampache_ynh_reloadservices
# Pre config ampache
ampache_ynh_doconfig
# Clean install
sudo rm -rf ../ampache-$version