2016-06-02 16:10:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-08-05 02:02:55 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-06-02 16:10:37 +02:00
|
|
|
|
2022-03-31 19:39:38 +02:00
|
|
|
source _common.sh
|
2018-08-05 02:02:55 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
|
|
|
#=================================================
|
2016-06-02 16:10:37 +02:00
|
|
|
|
2023-01-07 00:06:27 +01:00
|
|
|
fpm_footprint="low"
|
|
|
|
fpm_free_footprint=0
|
|
|
|
fpm_usage="low"
|
|
|
|
|
2022-03-31 19:39:38 +02:00
|
|
|
#=================================================
|
|
|
|
# STORE SETTINGS FROM MANIFEST
|
|
|
|
#=================================================
|
|
|
|
|
2023-01-07 00:06:27 +01:00
|
|
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
|
|
|
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
|
|
|
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
2022-03-31 19:39:38 +02:00
|
|
|
|
2018-08-05 02:02:55 +02:00
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2022-04-04 20:21:11 +02:00
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=4
|
2018-08-05 02:02:55 +02:00
|
|
|
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
2023-02-17 22:34:43 +01:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
2016-06-02 16:10:37 +02:00
|
|
|
|
2023-02-17 22:34:43 +01:00
|
|
|
chown -R $app:www-data "$install_dir"
|
2021-05-26 12:16:06 +02:00
|
|
|
|
2022-10-16 20:26:47 +02:00
|
|
|
#=================================================
|
2023-02-17 22:45:03 +01:00
|
|
|
# SYSTEM CONFIGURATION
|
2022-10-16 20:26:47 +02:00
|
|
|
#=================================================
|
2023-02-17 22:45:03 +01:00
|
|
|
ynh_script_progression --message="Adding system configurations related to $app ..." --weight=3
|
2022-10-16 20:26:47 +02:00
|
|
|
|
|
|
|
# Create a dedicated PHP-FPM config
|
2023-01-07 00:06:27 +01:00
|
|
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
2020-12-02 12:13:13 +01:00
|
|
|
|
2022-03-31 19:39:38 +02:00
|
|
|
# Create a dedicated NGINX config
|
2020-12-02 12:13:13 +01:00
|
|
|
ynh_add_nginx_config
|
|
|
|
|
2020-07-08 09:49:14 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-06-24 18:59:21 +02:00
|
|
|
|
2022-04-04 20:12:41 +02:00
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|