mirror of
https://github.com/YunoHost-Apps/ampache_ynh.git
synced 2024-09-03 18:15:55 +02:00
37 lines
786 B
Bash
37 lines
786 B
Bash
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
. /usr/share/yunohost/helpers
|
|
. _common
|
|
ynh_abort_if_errors
|
|
|
|
# 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
|