2013-12-24 13:37:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2017-04-16 17:22:30 +02:00
|
|
|
|
2020-10-13 17:56:48 +02:00
|
|
|
source _common.sh
|
2017-04-17 18:20:58 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2016-08-24 19:33:06 +02:00
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
|
|
|
#=================================================
|
|
|
|
|
2022-12-24 21:17:33 +01:00
|
|
|
fpm_footprint="low"
|
|
|
|
fpm_free_footprint=0
|
|
|
|
fpm_usage="low"
|
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# STORE SETTINGS FROM MANIFEST
|
|
|
|
#=================================================
|
|
|
|
|
2022-12-24 21:17:33 +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
|
2017-09-02 22:57:43 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2019-05-03 20:04:21 +02:00
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=3
|
2017-09-02 22:57:43 +02:00
|
|
|
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
2023-04-18 09:37:51 +02:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
|
|
|
mkdir -p $install_dir/{data,tmp}
|
2022-07-29 00:49:56 +02:00
|
|
|
|
2023-04-18 09:37:51 +02:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
2013-12-24 13:37:55 +01:00
|
|
|
|
2017-09-02 22:57:43 +02:00
|
|
|
#=================================================
|
|
|
|
# PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2020-10-13 17:56:48 +02:00
|
|
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
2013-12-24 13:37:55 +01:00
|
|
|
|
2020-10-13 17:56:48 +02:00
|
|
|
# Create a dedicated PHP-FPM config
|
2022-12-24 21:17:33 +01:00
|
|
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
2013-12-24 13:37:55 +01:00
|
|
|
|
2022-07-28 21:27:54 +02:00
|
|
|
# Create a dedicated NGINX config
|
|
|
|
ynh_add_nginx_config
|
|
|
|
|
2019-05-03 20:04:21 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2017-09-02 22:57:43 +02:00
|
|
|
|
2022-07-28 21:27:54 +02:00
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|