1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/librespeed_ynh.git synced 2024-09-03 19:36:23 +02:00
librespeed_ynh/scripts/upgrade
Éric Gaspar 82cb5ef95c cleaning
2024-09-02 14:56:38 +02:00

39 lines
1.3 KiB
Bash

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Upgrading source files..."
ynh_setup_source --dest_dir="$install_dir" --keep="results/telemetry_settings.php index.html"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression "Upgrading NGINX web server configuration..."
ynh_config_add_nginx
ynh_config_add_phpfpm
#=================================================
# CONFIGURE LIBRESPEED
#=================================================
ynh_script_progression "Reconfiguring LibreSpeed..."
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
#=================================================
ynh_script_progression "Upgrade of $app completed"