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 2022-05-30 13:57:24 +02:00
parent 6dbca5635f
commit 36e4023ce6
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 18 additions and 18 deletions

View file

@ -132,7 +132,7 @@ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name <
ynh_script_progression --message="Installing $app with Composer..." --weight=45 ynh_script_progression --message="Installing $app with Composer..." --weight=45
# Install composer # Install composer
ynh_install_composer --install_args="--ignore-platform-req=ext-intl" ynh_install_composer
#================================================= #=================================================
# INSTALL MULTIMEDIA DIRECTORIES # INSTALL MULTIMEDIA DIRECTORIES

View file

@ -19,7 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
admin_ampache=$(ynh_app_setting_get --app=$app --key=admin) admin_ampache=$(ynh_app_setting_get --app=$app --key=admin)
is_public=$(ynh_app_setting_get --app=$app --key=is_public) #is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
@ -95,7 +95,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=3 ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/ampache.cfg.php"
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"
@ -133,11 +133,11 @@ ynh_add_fpm_config --usage=low --footprint=low
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading Ampache configuration..." #ynh_script_progression --message="Upgrading Ampache configuration..."
ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" #ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php"
chmod 600 "$final_path/config/ampache.cfg.php" #chmod 600 "$final_path/config/ampache.cfg.php"
chown $app:$app "$final_path/config/ampache.cfg.php" #chown $app:$app "$final_path/config/ampache.cfg.php"
#================================================= #=================================================
# UPDATE AMPACHE WITH COMPOSER # UPDATE AMPACHE WITH COMPOSER
@ -145,7 +145,7 @@ then
ynh_script_progression --message="Upgrading ampache with Composer..." --weight=30 ynh_script_progression --message="Upgrading ampache with Composer..." --weight=30
# Install composer # Install composer
ynh_install_composer --install_args="--ignore-platform-req=ext-intl" ynh_install_composer
ynh_composer_exec --phpversion="${YNH_PHP_VERSION}" --workdir="$final_path" --commands="config discard-changes true" ynh_composer_exec --phpversion="${YNH_PHP_VERSION}" --workdir="$final_path" --commands="config discard-changes true"
fi fi
@ -162,13 +162,13 @@ ynh_multimedia_build_main_dir
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading Ampache with cURL..." --weight=6 #ynh_script_progression --message="Upgrading Ampache with cURL..." --weight=6
# Set the app as temporarily public for cURL call # Set the app as temporarily public for cURL call
if ! ynh_permission_has_user --permission="main" --user="visitors" #if ! ynh_permission_has_user --permission="main" --user="visitors"
then #then
ynh_permission_update --permission="main" --add="visitors" # ynh_permission_update --permission="main" --add="visitors"
fi #fi
# Reload NGINX # Reload NGINX
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -180,12 +180,12 @@ fi
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." # ynh_script_progression --message="Configuring permissions..."
if [ $is_public -eq 0 ] # if [ $is_public -eq 0 ]
then # then
ynh_permission_update --permission="main" --remove="visitors" # ynh_permission_update --permission="main" --remove="visitors"
fi # fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX