2023-06-05 17:27:49 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_script_progression "Setting up source files..."
|
2023-06-05 17:27:49 +02:00
|
|
|
|
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
|
|
|
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_replace --match="define('ENVIRONMENT', 'development');" --replace="define('ENVIRONMENT', 'production');" --file=$install_dir/index.php
|
2023-06-05 17:27:49 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SYSTEM CONFIGURATION
|
|
|
|
#=================================================
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_script_progression "Adding system configurations related to $app..."
|
|
|
|
|
|
|
|
ynh_config_add_phpfpm
|
2023-06-05 17:27:49 +02:00
|
|
|
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_config_add_nginx
|
2023-06-05 17:27:49 +02:00
|
|
|
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_config_add_logrotate
|
2023-06-05 17:27:49 +02:00
|
|
|
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
|
2023-06-05 17:27:49 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2024-08-30 22:44:17 +02:00
|
|
|
ynh_script_progression "Installation of $app completed"
|