mirror of
https://github.com/YunoHost-Apps/librespeed_ynh.git
synced 2024-09-03 19:36:23 +02:00
cleaning
This commit is contained in:
parent
3cc21cfa29
commit
c91446dd3b
6 changed files with 13 additions and 36 deletions
|
@ -18,7 +18,7 @@ userdoc = "https://github.com/librespeed/speedtest/wiki"
|
||||||
code = "https://github.com/librespeed/speedtest"
|
code = "https://github.com/librespeed/speedtest"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2"
|
yunohost = ">= 11.2.15"
|
||||||
helpers_version = "2.1"
|
helpers_version = "2.1"
|
||||||
architectures = "all"
|
architectures = "all"
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
|
|
|
@ -13,15 +13,11 @@ ynh_print_info "Declaring files to be backed up..."
|
||||||
ynh_backup "$install_dir"
|
ynh_backup "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
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"
|
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -12,7 +12,6 @@ ynh_app_setting_set --key=password --value="$password"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Setting up source files..."
|
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"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chown -R $app:www-data $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..."
|
ynh_script_progression "Configuring NGINX web server..."
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_config_add_nginx
|
ynh_config_add_nginx
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
|
||||||
ynh_config_add_phpfpm
|
ynh_config_add_phpfpm
|
||||||
|
|
||||||
ynh_mysql_db_shell < "$install_dir/results/telemetry_mysql.sql"
|
ynh_mysql_db_shell < "$install_dir/results/telemetry_mysql.sql"
|
||||||
|
|
|
@ -4,14 +4,12 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
ynh_config_remove_nginx
|
||||||
|
|
||||||
# Remove the dedicated PHP-FPM config
|
|
||||||
ynh_config_remove_phpfpm
|
ynh_config_remove_phpfpm
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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 ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -24,8 +23,6 @@ ynh_mysql_db_shell < ./db.sql
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEM CONFIGURATIONS
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression "Restoring system configurations related to $app..."
|
ynh_script_progression "Restoring system configurations related to $app..."
|
||||||
|
|
||||||
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||||
|
|
|
@ -8,14 +8,9 @@ ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression "Upgrading source files..."
|
||||||
|
|
||||||
if ynh_app_upstream_version_changed
|
ynh_setup_source --dest_dir="$install_dir" --keep="results/telemetry_settings.php index.html"
|
||||||
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
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$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..."
|
ynh_script_progression "Upgrading NGINX web server configuration..."
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_config_add_nginx
|
ynh_config_add_nginx
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
|
||||||
ynh_config_add_phpfpm
|
ynh_config_add_phpfpm
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE LIBRESPEED
|
# CONFIGURE LIBRESPEED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression "Reconfiguring $app..."
|
||||||
|
|
||||||
if ynh_app_upstream_version_changed
|
ynh_config_add --template="telemetry_settings.php" --destination="$install_dir/results/telemetry_settings.php"
|
||||||
then
|
chmod 650 "$install_dir/results/telemetry_settings.php"
|
||||||
ynh_script_progression "Reconfiguring LibreSpeed..."
|
chown $app:www-data "$install_dir/results/telemetry_settings.php"
|
||||||
|
|
||||||
ynh_config_add --template="telemetry_settings.php" --destination="$install_dir/results/telemetry_settings.php"
|
ynh_config_add --template="example-singleServer-full.html" --destination="$install_dir/index.html"
|
||||||
chmod 650 "$install_dir/results/telemetry_settings.php"
|
chmod 650 "$install_dir/index.html"
|
||||||
chown $app:www-data "$install_dir/results/telemetry_settings.php"
|
chown $app:www-data "$install_dir/index.html"
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue