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:
ericgaspar 2021-11-28 10:38:01 +01:00
parent 53bb365a84
commit 4095e9f848
5 changed files with 21 additions and 15 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/ampache/ampache/archive/5.0.0.tar.gz
SOURCE_SUM=ed1deea622385b81e3d4078e7152f5b35489dcb148e64ee6e4a8a1289fc5c950
SOURCE_URL=https://github.com/ampache/ampache/archive/5.1.1.tar.gz
SOURCE_SUM=7052e47d87df3289e45f759269ca7933e4a8fc49b4d873b60fe63721652beddd
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Web based audio/video streaming application",
"fr": "Application de streaming audio et vidéo"
},
"version": "5.0.0~ynh1",
"version": "5.1.1~ynh1",
"url": "http://ampache.org",
"license": "AGPL-3.0",
"maintainer": {

View file

@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
admin_ampache=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
phpversion=$YNH_PHP_VERSION
app=$YNH_APP_INSTANCE_NAME
@ -46,6 +47,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin_ampache
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
#=================================================
# STANDARD MODIFICATIONS
@ -72,7 +74,7 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -168,7 +170,9 @@ ynh_secure_remove --file=/tmp/admin.sql
ynh_script_progression --message="Securing files and directories..."
# Set permissions to ampache directory
chown -R $app:$app $final_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 600 $final_path/config/ampache.cfg.php
#=================================================

View file

@ -45,6 +45,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -52,21 +60,15 @@ ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# RESTORE USER RIGHTS
#=================================================
ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files
chown -R $app:$app $final_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 600 $final_path/config/ampache.cfg.php
#=================================================

View file

@ -83,7 +83,7 @@ fi
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE