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
0c99579e9c
commit
82cb5ef95c
6 changed files with 9 additions and 45 deletions
|
@ -18,7 +18,7 @@ userdoc = "https://github.com/librespeed/speedtest/wiki"
|
|||
code = "https://github.com/librespeed/speedtest"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2.18"
|
||||
yunohost = ">= 11.2.29"
|
||||
helpers_version = "2.1"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -18,10 +17,6 @@ ynh_backup "$install_dir"
|
|||
|
||||
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"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -12,20 +12,15 @@ 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"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data $install_dir
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod o-rwx $install_dir
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
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"
|
||||
|
@ -36,8 +31,6 @@ ynh_mysql_db_shell < "$install_dir/results/telemetry_mysql.sql"
|
|||
ynh_script_progression "Configuring $app..."
|
||||
|
||||
ynh_config_add --template="telemetry_settings.php" --destination="$install_dir/results/telemetry_settings.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 650 "$install_dir/results/telemetry_settings.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | 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"
|
||||
|
|
|
@ -8,10 +8,8 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression "Removing NGINX web server configuration..."
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_config_remove_nginx
|
||||
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_config_remove_phpfpm
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
|
|||
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -23,8 +20,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"
|
||||
|
|
|
@ -8,46 +8,29 @@ ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="results/telemetry_settings.php index.html"
|
||||
|
||||
# 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
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
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 LibreSpeed..."
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
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"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 650 "$install_dir/results/telemetry_settings.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | 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="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/index.html"
|
||||
chown $app:www-data "$install_dir/index.html"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue