1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/taskboard_ynh.git synced 2024-09-03 20:26:27 +02:00
taskboard_ynh/scripts/install

73 lines
2.4 KiB
Text
Raw Normal View History

2020-12-12 18:10:50 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
2023-01-07 07:53:48 +01:00
fpm_footprint="low"
fpm_free_footprint=0
fpm_usage="low"
2020-12-12 18:10:50 +01:00
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
2023-01-07 07:53:48 +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
2020-12-12 18:10:50 +01:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
2023-04-01 19:16:56 +02:00
ynh_setup_source --dest_dir="$install_dir"
2020-12-12 18:10:50 +01:00
2023-04-01 19:16:56 +02:00
chmod 750 "$install_dir"
chmod 777 "$install_dir/api"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2021-06-01 21:14:07 +02:00
2020-12-12 18:10:50 +01:00
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
2021-08-30 17:21:43 +02:00
ynh_script_progression --message="Configuring PHP-FPM..." --weight=4
2020-12-12 18:10:50 +01:00
# Create a dedicated PHP-FPM config
2023-01-07 07:53:48 +01:00
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
2020-12-12 18:10:50 +01:00
2023-01-07 07:53:48 +01:00
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=10
# Create a dedicated NGINX config
ynh_add_nginx_config
2021-08-30 17:20:07 +02:00
#=================================================
# ADD A CONFIGURATION
#=================================================
2021-08-30 17:21:43 +02:00
ynh_script_progression --message="Adding a configuration file..." --weight=2
2021-08-30 17:20:07 +02:00
dir="__DIR__"
2023-04-01 19:16:56 +02:00
ynh_add_config --template="../conf/Mailer.php" --destination="$install_dir/api/helpers/Mailer.php"
2021-08-30 17:20:07 +02:00
2023-04-01 19:16:56 +02:00
chmod 400 "$install_dir/api/helpers/Mailer.php"
chown $app:$app "$install_dir/api/helpers/Mailer.php"
2021-08-30 17:20:07 +02:00
2020-12-12 18:10:50 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of TaskBoard completed" --last