#!/bin/bash set -eu #================================================= # IMPORT GENERIC HELPERS #================================================= . /usr/share/yunohost/helpers . _common.sh #================================================= # MANAGE SCRIPT FAILURE #================================================= ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= # Retrieve arguments app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) db_pwd=$(ynh_app_setting_get $app mysqlpwd) admin_ampache=$(ynh_app_setting_get $app admin) #================================================= # CHECK THE PATH #================================================= path_url=$(ynh_normalize_url_path $path_url) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= # Get sources and copy files to the right place ampache_ynh_getsources # Change variables in Ampache configuration ampache_ynh_prepareconfig #================================================= # NGINX CONFIGURATION #================================================= # Modify Nginx configuration file and copy it to Nginx conf directory ynh_add_nginx_config #================================================= # INSTALL DEPENDENCIES #================================================= # Install dependency ynh_install_app_dependencies libav-tools #================================================= # SPECIFIC SETUP #================================================= # Ampache installation ampache_ynh_install #================================================= # RELOAD SSOWAT #================================================= # Regenerate SSOwat conf ampache_ynh_reloadservices #================================================= # SETUP APPLICATION WITH CURL #================================================= # Pre config ampache ampache_ynh_doconfig #================================================= # CLEANING #================================================= # Clean install ynh_secure_remove ../ampache-$version