2019-03-12 00:02:09 +01:00
|
|
|
#!/bin/bash
|
2015-09-27 00:52:48 +02:00
|
|
|
|
2019-03-12 00:02:09 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2015-09-27 00:52:48 +02:00
|
|
|
|
2019-03-12 00:02:09 +01:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
|
|
|
#=================================================
|
|
|
|
|
2022-03-13 16:00:14 +01:00
|
|
|
timezone="$(cat /etc/timezone)"
|
2021-07-04 10:23:53 +02:00
|
|
|
|
2019-03-12 00:02:09 +01:00
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2023-01-22 12:56:27 +01:00
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=5
|
2015-09-27 00:52:56 +02:00
|
|
|
|
2019-03-12 00:02:09 +01:00
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
2023-04-01 15:05:36 +02:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
2015-09-27 01:21:26 +02:00
|
|
|
|
2023-04-01 15:05:36 +02:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
2021-07-04 10:23:53 +02:00
|
|
|
|
2019-03-12 00:02:09 +01:00
|
|
|
#=================================================
|
|
|
|
# PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2020-11-28 10:09:39 +01:00
|
|
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
|
2019-03-12 00:02:09 +01:00
|
|
|
|
2020-11-28 10:09:39 +01:00
|
|
|
# Create a dedicated PHP-FPM config
|
2023-11-07 18:36:04 +01:00
|
|
|
ynh_add_fpm_config
|
2019-03-12 00:02:09 +01:00
|
|
|
|
2023-02-07 17:25:11 +01:00
|
|
|
# Create a dedicated NGINX config
|
|
|
|
ynh_add_nginx_config
|
|
|
|
|
2023-06-03 21:45:59 +02:00
|
|
|
# Use logrotate to manage application logfile(s)
|
|
|
|
ynh_use_logrotate
|
|
|
|
|
2021-03-02 10:09:52 +01:00
|
|
|
# =================================================
|
2019-03-12 00:02:09 +01:00
|
|
|
# MODIFY A CONFIG FILE
|
2021-03-02 10:09:52 +01:00
|
|
|
# =================================================
|
2022-04-14 11:18:38 +02:00
|
|
|
ynh_script_progression --message="Modifying $app config file..."
|
2020-11-28 10:09:39 +01:00
|
|
|
|
2023-04-01 15:05:36 +02:00
|
|
|
ynh_add_config --template="../conf/noalyss.conf" --destination="$install_dir/include/config.inc.php"
|
2015-09-27 02:54:32 +02:00
|
|
|
|
2023-04-01 15:05:36 +02:00
|
|
|
chmod 650 "$install_dir/include/config.inc.php"
|
|
|
|
chown $app: "$install_dir/include/config.inc.php"
|
2021-11-27 08:27:38 +01:00
|
|
|
|
2019-03-12 00:02:09 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2015-09-28 01:09:37 +02:00
|
|
|
|
2020-11-28 10:38:48 +01:00
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|