1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ampache_ynh.git synced 2024-09-03 18:15:55 +02:00
This commit is contained in:
Éric Gaspar 2023-12-22 14:00:55 +01:00
parent 9e7d3efad8
commit 2d7bf0ea4e
4 changed files with 10 additions and 18 deletions

View file

@ -5,7 +5,7 @@ name = "Ampache"
description.en = "Web based audio/video streaming application"
description.fr = "Application de streaming audio et vidéo"
version = "6.1.0~ynh1"
version = "6.2.0~ynh1"
maintainers = []
@ -20,8 +20,11 @@ code = "https://github.com/ampache/ampache"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
ldap = true
sso = false
disk = "50M"
ram.build = "500M"
ram.runtime = "50M"
@ -43,8 +46,8 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
url = "https://github.com/ampache/ampache/releases/download/6.1.0/ampache-6.1.0_all_php8.2.zip"
sha256 = "312b2eb738fa9bf32bf044262cb6e849a32673f19e7548c4a8d06ff21dfb2239"
url = "https://github.com/ampache/ampache/releases/download/6.2.0/ampache-6.2.0_all_php8.2.zip"
sha256 = "4b91e0fbe6d16c7c5d3d377219852304d7394663c544c3da2b82097b75706270"
in_subdir = false
autoupdate.strategy = "latest_github_tag"

View file

@ -26,7 +26,6 @@ ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=2
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
@ -37,10 +36,8 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -50,7 +47,6 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Loading default database..." --weight=2
# Load default ampache database
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name < "$install_dir/resources/sql/ampache.sql"
#=================================================
@ -65,7 +61,7 @@ ynh_multimedia_build_main_dir
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=2
ynh_add_config --template="../conf/ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php"
ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php"
chmod 600 "$install_dir/config/ampache.cfg.php"
chown $app: "$install_dir/config/ampache.cfg.php"

View file

@ -16,16 +16,12 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
# Remove the log files
ynh_secure_remove --file="/var/log/$app"
#=================================================

View file

@ -36,7 +36,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="config/ampache.cfg.php"
fi
@ -48,10 +47,8 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -76,7 +73,7 @@ fi
#(cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e)
#ynh_add_config --template="../conf/ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php"
#ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php"
#chmod 600 "$install_dir/config/ampache.cfg.php"
#chown $app: "$install_dir/config/ampache.cfg.php"