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

52 lines
1.8 KiB
Text
Raw Permalink Normal View History

2018-01-24 20:18:53 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2020-12-07 11:33:01 +01:00
ynh_script_progression --message="Setting up source files..."
2018-01-24 20:18:53 +01:00
# Download, check integrity, uncompress and patch the source from app.src
2023-10-15 14:03:13 +02:00
ynh_setup_source "$install_dir"
2018-01-24 20:18:53 +01:00
2023-10-15 14:03:13 +02:00
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2021-08-16 12:16:15 +02:00
2018-01-24 20:18:53 +01:00
#=================================================
# NGINX CONFIGURATION
#=================================================
2020-12-07 12:03:27 +01:00
ynh_script_progression --message="Configuring NGINX web server..."
2018-01-24 20:18:53 +01:00
# Create a dedicated nginx config
ynh_add_nginx_config
2020-12-07 12:03:27 +01:00
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
2023-10-15 14:03:13 +02:00
#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
2019-03-09 10:14:08 +01:00
2020-12-07 12:03:27 +01:00
#=================================================
# SETUP APPLICATION WITH CURL
#=================================================
ynh_script_progression --message="Finalizing installation..."
2018-01-24 20:18:53 +01:00
2019-03-09 10:14:08 +01:00
#page 1
ynh_local_curl "/admin/install.php" "install_form_1_sended=1" "langue=$language"
#page 2
2023-10-15 14:03:13 +02:00
ynh_local_curl "/admin/install.php?s=2&l=$language" "identifiant=$admin" "mdp=$password" "racine=https://$domain$path/" "comm_defaut_status=1" "langue=$language" "install_form_2_sended=1"
2019-03-09 10:14:08 +01:00
#page 3
ynh_local_curl "/admin/install.php?s=3&l=$language" "sgdb=mysql" "mysql_user=$db_user" "mysql_passwd=$db_pwd" "mysql_db=$db_name" "mysql_host=localhost" "langue=$language" "install_form_3_sended=1"
#=================================================
# END OF SCRIPT
#=================================================
2020-12-07 11:33:01 +01:00
ynh_script_progression --message="Installation of $app completed"