1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fluxbb_ynh.git synced 2024-09-03 18:36:14 +02:00
fluxbb_ynh/scripts/install

56 lines
2 KiB
Text
Raw Permalink Normal View History

2017-10-21 01:09:55 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
2021-11-23 17:38:41 +01:00
email=$(ynh_user_get_info --username=$admin --key=mail)
2019-03-08 21:39:44 +01:00
2017-10-21 01:09:55 +02:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2021-06-29 19:47:16 +02:00
ynh_script_progression --message="Setting up source files..." --weight=1
2019-03-08 21:39:44 +01:00
# Download, check integrity, uncompress and patch the source from app.src
2023-05-02 20:27:26 +02:00
ynh_setup_source --dest_dir="$install_dir"
2017-10-21 01:09:55 +02:00
2023-05-02 20:27:26 +02:00
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2021-06-29 19:47:16 +02:00
2017-10-21 01:09:55 +02:00
#=================================================
# NGINX CONFIGURATION
#=================================================
2021-06-29 19:47:16 +02:00
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
2017-10-21 01:09:55 +02:00
2019-03-08 21:39:44 +01:00
# Create a dedicated nginx config
2017-10-21 01:09:55 +02:00
ynh_add_nginx_config
2019-03-08 21:39:44 +01:00
# Create a dedicated php-fpm config
2023-11-24 17:19:19 +01:00
ynh_add_fpm_config
2019-03-08 21:39:44 +01:00
2017-10-21 01:09:55 +02:00
#=================================================
2020-12-08 09:08:58 +01:00
# SETUP APPLICATION WITH CURL
2019-03-08 21:39:44 +01:00
#=================================================
2020-12-07 23:43:48 +01:00
2020-12-08 09:08:58 +01:00
# Installation with cURL
ynh_script_progression --message="Finalizing installation..."
2023-05-02 20:27:26 +02:00
ynh_local_curl "/install.php" "form_sent=1" "install_lang=English" "req_db_type=mysqli_innodb" "req_db_host=localhost" "req_db_name=$db_name" "db_username=$db_user" "db_password=$db_pwd" "db_prefix=fl_" "req_username=$admin" "req_password1=$password" "req_password2=$password" "req_email=$email" "req_title=YunoFluxBB" "desc=FluxBB_package_for_Yunohost" "req_base_url=https://$domain$path" "req_default_lang=English" "req_default_style=Air"
2020-12-08 09:08:58 +01:00
2023-05-02 20:34:22 +02:00
ynh_secure_remove "$install_dir/install.php"
2019-03-08 21:39:44 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2021-06-29 19:47:16 +02:00
ynh_script_progression --message="Installation of $app completed" --last