2018-10-30 10:25:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
|
|
|
#=================================================
|
|
|
|
|
2022-06-18 18:16:35 +02:00
|
|
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
2023-03-20 22:36:23 +01:00
|
|
|
|
2018-10-30 10:25:13 +01:00
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2021-07-10 18:27:01 +02:00
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=4
|
2018-10-30 10:25:13 +01:00
|
|
|
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
2023-03-20 22:36:23 +01:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
2018-10-30 10:25:13 +01:00
|
|
|
|
2023-03-20 22:36:23 +01:00
|
|
|
chown -R $app:www-data "$install_dir"
|
2021-05-26 10:12:13 +02:00
|
|
|
|
2022-06-18 18:16:35 +02:00
|
|
|
#=================================================
|
|
|
|
# PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
|
|
|
|
|
|
|
|
# Create a dedicated PHP-FPM config
|
2023-11-02 16:11:15 +01:00
|
|
|
ynh_add_fpm_config
|
2022-06-18 18:16:35 +02:00
|
|
|
|
2020-09-13 17:56:50 +02:00
|
|
|
# Create a dedicated NGINX config
|
2018-10-30 10:25:13 +01:00
|
|
|
ynh_add_nginx_config
|
|
|
|
|
2021-04-28 17:36:41 +02:00
|
|
|
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
2021-07-10 18:27:01 +02:00
|
|
|
chown root: "/etc/cron.d/$app"
|
|
|
|
chmod 644 "/etc/cron.d/$app"
|
2019-07-01 23:12:24 +02:00
|
|
|
|
2019-07-01 22:17:06 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-07-01 23:12:24 +02:00
|
|
|
|
2022-04-27 14:52:20 +02:00
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|