1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/librespeed_ynh.git synced 2024-09-03 19:36:23 +02:00
This commit is contained in:
Éric Gaspar 2024-06-23 09:58:53 +02:00
parent 3cc21cfa29
commit c91446dd3b
6 changed files with 13 additions and 36 deletions

View file

@ -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

View file

@ -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"
#=================================================

View file

@ -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"

View file

@ -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
#=================================================

View file

@ -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"

View file

@ -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