mirror of
https://github.com/YunoHost-Apps/librespeed_ynh.git
synced 2024-09-03 19:36:23 +02:00
43 lines
1.3 KiB
Bash
Executable file
43 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
ynh_app_setting_set --key=php_upload_max_filesize --value=256M
|
|
|
|
ynh_app_setting_set --key=password --value="$password"
|
|
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression "Setting up source files..."
|
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
|
|
|
#=================================================
|
|
# NGINX CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Configuring NGINX web server..."
|
|
|
|
ynh_config_add_nginx
|
|
|
|
ynh_config_add_phpfpm
|
|
|
|
ynh_mysql_db_shell < "$install_dir/results/telemetry_mysql.sql"
|
|
|
|
#=================================================
|
|
# CONFIGURE LIBRESPEED
|
|
#=================================================
|
|
ynh_script_progression "Configuring $app..."
|
|
|
|
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 "Installation of $app completed"
|