diff --git a/manifest.toml b/manifest.toml index d7f6671..00bbe0c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ userdoc = "https://github.com/librespeed/speedtest/wiki" code = "https://github.com/librespeed/speedtest" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.15" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index 5f6ebae..5dd8e98 100755 --- a/scripts/backup +++ b/scripts/backup @@ -13,15 +13,11 @@ ynh_print_info "Declaring files to be backed up..." ynh_backup "$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/install b/scripts/install index fa9c459..e0d0156 100755 --- a/scripts/install +++ b/scripts/install @@ -12,7 +12,6 @@ ynh_app_setting_set --key=password --value="$password" #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" chown -R $app:www-data $install_dir @@ -23,10 +22,8 @@ chmod o-rwx $install_dir #================================================= ynh_script_progression "Configuring NGINX web server..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm ynh_mysql_db_shell < "$install_dir/results/telemetry_mysql.sql" diff --git a/scripts/remove b/scripts/remove index 0201b35..ee9c6ec 100755 --- a/scripts/remove +++ b/scripts/remove @@ -4,14 +4,12 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# REMOVE NGINX CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression "Removing NGINX web server configuration..." +ynh_script_progression "Removing system configurations related to $app..." -# Remove the dedicated NGINX config ynh_config_remove_nginx -# Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm #================================================= diff --git a/scripts/restore b/scripts/restore index 81e5f3a..e16bf0e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -24,8 +23,6 @@ ynh_mysql_db_shell < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression "Restoring system configurations related to $app..." ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 3665e4c..e9b2f48 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,14 +8,9 @@ ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression "Upgrading source files..." -if ynh_app_upstream_version_changed -then - ynh_script_progression "Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="results/telemetry_settings.php index.html" -fi +ynh_setup_source --dest_dir="$install_dir" --keep="results/telemetry_settings.php index.html" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -25,28 +20,22 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression "Upgrading NGINX web server configuration..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm #================================================= # CONFIGURE LIBRESPEED #================================================= +ynh_script_progression "Reconfiguring $app..." -if ynh_app_upstream_version_changed -then - ynh_script_progression "Reconfiguring LibreSpeed..." +ynh_config_add --template="telemetry_settings.php" --destination="$install_dir/results/telemetry_settings.php" +chmod 650 "$install_dir/results/telemetry_settings.php" +chown $app:www-data "$install_dir/results/telemetry_settings.php" - ynh_config_add --template="telemetry_settings.php" --destination="$install_dir/results/telemetry_settings.php" - chmod 650 "$install_dir/results/telemetry_settings.php" - chown $app:www-data "$install_dir/results/telemetry_settings.php" - - ynh_config_add --template="example-singleServer-full.html" --destination="$install_dir/index.html" - chmod 650 "$install_dir/index.html" - chown $app:www-data "$install_dir/index.html" -fi +ynh_config_add --template="example-singleServer-full.html" --destination="$install_dir/index.html" +chmod 650 "$install_dir/index.html" +chown $app:www-data "$install_dir/index.html" #================================================= # END OF SCRIPT