From d3f1f8a7173190884f1d354dd5f93a32b4346ff1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 17 Mar 2021 22:32:03 +0100 Subject: [PATCH 1/9] Fiw linter warnings --- README.md | 2 +- conf/ampache.cfg.php | 12 ++++++------ manifest.json | 18 +----------------- scripts/change_url | 17 +++++++++++++++++ scripts/install | 9 ++++----- scripts/upgrade | 39 +++++++++++++-------------------------- 6 files changed, 42 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 38e1a77..e4b4038 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Documentation * Official documentation: https://github.com/ampache/ampache/wiki - * YunoHost documentation: https://yunohost.org/#/app_ampache + * YunoHost documentation: https://yunohost.org/en/app_ampache ## YunoHost specific features diff --git a/conf/ampache.cfg.php b/conf/ampache.cfg.php index 646ef82..176d0ed 100644 --- a/conf/ampache.cfg.php +++ b/conf/ampache.cfg.php @@ -23,7 +23,7 @@ config_version = 40 ; If not set, retrieved automatically from client request. ; This setting is required for WebSocket server ; DEFAULT: "" -http_host = "__DOMAINTOCHANGE__" +http_host = "__DOMAIN__" ; The public http port of your server. ; If not set, retrieved automatically from client request. @@ -37,7 +37,7 @@ http_host = "__DOMAINTOCHANGE__" ; if it is located at http://localhost/music you need to ; set web_path to /music ; DEFAULT: "" -web_path = "__PATHTOCHANGE__" +web_path = "__PATH__" ; The local http url of your server. ; This is used to access the server from within the @@ -66,17 +66,17 @@ database_hostname = localhost ; Name of your ampache database ; DEFAULT: ampache -database_name = "__DBNAME__" +database_name = "__DB_NAME__" ; Username for your ampache database ; DEFAULT: "" -database_username = "__DBUSER__" +database_username = "__DB_USER__" ; Password for your ampache database, this can not be blank ; this is a 'forced' security precaution, the default value ; will not work (except if using socket authentication) ; DEFAULT: "" -database_password = "__DBPWD__" +database_password = "__DB_PWD__" ;######################################################### @@ -85,7 +85,7 @@ database_password = "__DBPWD__" ; Cryptographic secret ; This MUST BE changed with your own secret key. Ampache-specific, just pick any random string you want. -secret_key = "__RANDOMKEYTOCHANGE__" +secret_key = "__SECRET_KEY__" ; Length that a session will last expressed in seconds. Default is ; one hour. diff --git a/manifest.json b/manifest.json index 853a37c..7c89e4e 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "aymhce@gmail.com" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services" : [ @@ -27,38 +27,22 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Ampache", - "fr": "Choisissez un nom de domaine pour Ampache" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Ampache", - "fr": "Choisissez un chemin pour Ampache" - }, "example": "/ampache", "default": "/ampache" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the Ampache administrator (must be an existing YunoHost user)", - "fr": "Administrateur du serveur Ampache (doit être un utilisateur YunoHost existant)" - }, "example": "homer" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true } ] diff --git a/scripts/change_url b/scripts/change_url index 64103c0..fc1fabd 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,6 +29,23 @@ ynh_script_progression --message="Loading installation settings..." # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. + ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" + + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= diff --git a/scripts/install b/scripts/install index 720c64f..4326777 100644 --- a/scripts/install +++ b/scripts/install @@ -46,7 +46,6 @@ 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=is_public --value=$is_public #================================================= # STANDARD MODIFICATIONS @@ -110,11 +109,11 @@ ynh_script_progression --message="Preconfiguring Ampache..." --weight=2 conf_file="$final_path/config/ampache.cfg.php" cp ../conf/ampache.cfg.php "$conf_file" -ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_user" --target_file="$conf_file" -ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$conf_file" -ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$conf_file" +ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" ynh_replace_string --match_string="__PATHTOCHANGE__" --replace_string="$path_url" --target_file="$conf_file" -ynh_replace_string --match_string="__DOMAINTOCHANGE__" --replace_string="$domain" --target_file="$conf_file" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" secret_key=$(ynh_string_random --length=24) ynh_replace_string --match_string="__RANDOMKEYTOCHANGE__" --replace_string="$secret_key" --target_file="$conf_file" ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key diff --git a/scripts/upgrade b/scripts/upgrade index 4e145db..20d71c4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) #================================================= @@ -37,21 +38,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# If is_public doesn't exist, create it -if [ -z $is_public ]; then - is_public=1 - ynh_app_setting_set --app=$app --key=is_public --value=$is_public -fi - -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) @@ -145,19 +131,20 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading Ampache configuration..." - conf_file="$final_path/config/ampache.cfg.php" - ynh_backup_if_checksum_is_different --file="$conf_file" + # conf_file="$final_path/config/ampache.cfg.php" + # ynh_backup_if_checksum_is_different --file="$conf_file" - ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_user" --target_file="$conf_file" - db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) - ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$conf_file" - ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$conf_file" - ynh_replace_string --match_string="__PATHTOCHANGE__" --replace_string="$path_url" --target_file="$conf_file" - ynh_replace_string --match_string="__DOMAINTOCHANGE__" --replace_string="$domain" --target_file="$conf_file" - ynh_replace_string --match_string="__RANDOMKEYTOCHANGE__" --replace_string="$secret_key" --target_file="$conf_file" + # ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" + # ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" + # ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" + # ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$conf_file" + # ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" + # ynh_replace_string --match_string="__SECRET_KEY__" --replace_string="$secret_key" --target_file="$conf_file" - # Calculate and store the config file checksum into the app settings - ynh_store_file_checksum --file="$conf_file" + # # Calculate and store the config file checksum into the app settings + # ynh_store_file_checksum --file="$conf_file" + + ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" #================================================= # UPDATE AMPACHE WITH COMPOSER From 743ef6388242ebed6d31b3da3069ccbc5e6d3b7a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 17 Mar 2021 22:34:57 +0100 Subject: [PATCH 2/9] Update check_process --- check_process | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 84ec4ce..35d8940 100644 --- a/check_process +++ b/check_process @@ -12,6 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=919c3359d9fe21c29bad1cabf0e7b9a8e368f20e backup_restore=1 multi_instance=1 port_already_use=0 @@ -20,6 +21,6 @@ Email=aymhce@gmail.com Notification=none ;;; Upgrade options - ; commit=11caf9791c48fdcd632193a1c82ea52d4819b328 - name=add ynh_abort_if_errors + ; commit=919c3359d9fe21c29bad1cabf0e7b9a8e368f20e + name=Merge pull request #70 from YunoHost-Apps/4.2.6 manifest_arg=domain=DOMAIN&path=PATH&admin=USER& From 91e54cc835e98d6787ab76037e9958dcb39b5245 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 17 Mar 2021 22:35:22 +0100 Subject: [PATCH 3/9] Update install --- scripts/install | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 4326777..ad0ab71 100644 --- a/scripts/install +++ b/scripts/install @@ -106,20 +106,24 @@ ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencie #================================================= ynh_script_progression --message="Preconfiguring Ampache..." --weight=2 -conf_file="$final_path/config/ampache.cfg.php" -cp ../conf/ampache.cfg.php "$conf_file" - -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" -ynh_replace_string --match_string="__PATHTOCHANGE__" --replace_string="$path_url" --target_file="$conf_file" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" secret_key=$(ynh_string_random --length=24) -ynh_replace_string --match_string="__RANDOMKEYTOCHANGE__" --replace_string="$secret_key" --target_file="$conf_file" ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$conf_file" +# conf_file="$final_path/config/ampache.cfg.php" + +# cp ../conf/ampache.cfg.php "$conf_file" + +# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" +# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" +# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" +# ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$conf_file" +# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" +# ynh_replace_string --match_string="__SECRET_KEY__" --replace_string="$secret_key" --target_file="$conf_file" + +# # Calculate and store the config file checksum into the app settings +# ynh_store_file_checksum --file="$conf_file" + +ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" #================================================= # LOAD DEFAULT DATABASE From d234fa2baa65a0ae84b26bd0ef5bffba1c3f3047 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Mar 2021 08:39:48 +0100 Subject: [PATCH 4/9] Fix --- scripts/install | 14 -------------- scripts/upgrade | 20 +++++--------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/scripts/install b/scripts/install index ad0ab71..280fa75 100644 --- a/scripts/install +++ b/scripts/install @@ -109,20 +109,6 @@ ynh_script_progression --message="Preconfiguring Ampache..." --weight=2 secret_key=$(ynh_string_random --length=24) ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key -# conf_file="$final_path/config/ampache.cfg.php" - -# cp ../conf/ampache.cfg.php "$conf_file" - -# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" -# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" -# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" -# ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$conf_file" -# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" -# ynh_replace_string --match_string="__SECRET_KEY__" --replace_string="$secret_key" --target_file="$conf_file" - -# # Calculate and store the config file checksum into the app settings -# ynh_store_file_checksum --file="$conf_file" - ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 20d71c4..ae36d1b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,19 +131,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading Ampache configuration..." - # conf_file="$final_path/config/ampache.cfg.php" - # ynh_backup_if_checksum_is_different --file="$conf_file" - - # ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" - # ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" - # ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" - # ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$conf_file" - # ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" - # ynh_replace_string --match_string="__SECRET_KEY__" --replace_string="$secret_key" --target_file="$conf_file" - - # # Calculate and store the config file checksum into the app settings - # ynh_store_file_checksum --file="$conf_file" - ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" #================================================= @@ -171,8 +158,11 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading Ampache with cURL..." --weight=6 - # Set the app as temporarily public for curl call - ynh_permission_update --permission="main" --add="visitors" + # Set the app as temporarily public for cURL call + if ! ynh_permission_has_user --permission="main" --user="visitors" + then + ynh_permission_update --permission="main" --add="visitors" + fi # Reload NGINX ynh_systemd_action --service_name=nginx --action=reload From ad106df969a89d003fa51a98252c9c4522a18720 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Mar 2021 19:56:31 +0100 Subject: [PATCH 5/9] Secure config file --- scripts/install | 17 +++++++++-------- scripts/restore | 1 + scripts/upgrade | 17 +++++++++-------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 280fa75..7ad7cba 100644 --- a/scripts/install +++ b/scripts/install @@ -66,6 +66,14 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." + +# Create a system user +ynh_system_user_create --username=$app + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -83,14 +91,6 @@ ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -169,6 +169,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions to ampache directory chown -R $app: $final_path +chmod 600 $final_path/config/ampache.cfg.php #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index db47654..2ff8cf2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,6 +70,7 @@ ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files chown -R $app: $final_path +chmod 600 $final_path/config/ampache.cfg.php #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index ae36d1b..802f538 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,6 +78,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -105,14 +113,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=5 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -180,6 +180,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app: $final_path +chmod 600 $final_path/config/ampache.cfg.php #================================================= # SETUP SSOWAT From ee42596a4ce102b9562044cb5f9549d92e4bce4a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Mar 2021 16:57:58 +0100 Subject: [PATCH 6/9] Upgrade to 4.4.1 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e4b4038..15c8de9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview [Ampache](http://ampache.org) for the love of music. A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device. -**Shipped version:** 4.4.0 +**Shipped version:** 4.4.1 ## Screenshots diff --git a/conf/app.src b/conf/app.src index 5e853e4..6dc4c16 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ampache/ampache/archive/4.4.0.tar.gz -SOURCE_SUM=8b5bbce6ef7c6bc7b70b3e481e66e4e5be0a4d0a6467bf929f5357f08b473bbb +SOURCE_URL=https://github.com/ampache/ampache/archive/4.4.1.tar.gz +SOURCE_SUM=7ff3f8ae4eb18709adc4b91477d083c0f306cec85183290deedb2aacdf4809e8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 7c89e4e..5a763c2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web based audio/video streaming application", "fr": "Application de streaming audio et vidéo" }, - "version": "4.4.0~ynh1", + "version": "4.4.1~ynh1", "url": "http://ampache.org", "license": "AGPL-3.0", "maintainer": { From 3d34f9d4de853b1a9854020af1de9af3a47ab453 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Mar 2021 18:45:28 +0100 Subject: [PATCH 7/9] Fix --- scripts/install | 3 ++- scripts/restore | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7ad7cba..7e44bbd 100644 --- a/scripts/install +++ b/scripts/install @@ -168,7 +168,8 @@ ynh_secure_remove --file=/tmp/admin.sql ynh_script_progression --message="Securing files and directories..." # Set permissions to ampache directory -chown -R $app: $final_path +chmod -R o-rwx $final_path +chown -R $app:$app $final_path chmod 600 $final_path/config/ampache.cfg.php #================================================= diff --git a/scripts/restore b/scripts/restore index 2ff8cf2..cfd2b5c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -69,7 +69,8 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files -chown -R $app: $final_path +chmod -R o-rwx $final_path +chown -R $app:$app $final_path chmod 600 $final_path/config/ampache.cfg.php #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 802f538..c361b16 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -179,7 +179,8 @@ fi ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chown -R $app: $final_path +chmod -R o-rwx $final_path +chown -R $app:$app $final_path chmod 600 $final_path/config/ampache.cfg.php #================================================= From 0d73180e9bf65db2770daa6ee13f135352dfd502 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Mar 2021 19:41:21 +0100 Subject: [PATCH 8/9] Fix --- scripts/install | 1 - scripts/restore | 1 - scripts/upgrade | 1 - 3 files changed, 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7e44bbd..edcbbbe 100644 --- a/scripts/install +++ b/scripts/install @@ -168,7 +168,6 @@ ynh_secure_remove --file=/tmp/admin.sql ynh_script_progression --message="Securing files and directories..." # Set permissions to ampache directory -chmod -R o-rwx $final_path chown -R $app:$app $final_path chmod 600 $final_path/config/ampache.cfg.php diff --git a/scripts/restore b/scripts/restore index cfd2b5c..baa17a9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -69,7 +69,6 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files -chmod -R o-rwx $final_path chown -R $app:$app $final_path chmod 600 $final_path/config/ampache.cfg.php diff --git a/scripts/upgrade b/scripts/upgrade index c361b16..f87d70d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -179,7 +179,6 @@ fi ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chmod -R o-rwx $final_path chown -R $app:$app $final_path chmod 600 $final_path/config/ampache.cfg.php From 9ee98d826f37167f3d0bc2158a1bd8b854b93167 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Apr 2021 17:49:25 +0200 Subject: [PATCH 9/9] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 15c8de9..348a203 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ this package: #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/ampache%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/ampache/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/ampache%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/ampache/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/ampache.svg)](https://ci-apps.yunohost.org/ci/apps/ampache/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/ampache.svg)](https://ci-apps-arm.yunohost.org/ci/apps/ampache/) ## Limitations