1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cloudlog_ynh.git synced 2024-09-03 18:16:23 +02:00
cloudlog_ynh/scripts/install

38 lines
1.1 KiB
Text
Raw Normal View History

2023-06-05 17:27:49 +02:00
#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2024-06-23 09:19:26 +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-06-23 09:19:26 +02:00
ynh_replace --match="define('ENVIRONMENT', 'development');" --replace="define('ENVIRONMENT', 'production');" --file=$install_dir/index.php
2024-03-07 23:04:21 +01:00
2023-06-05 17:27:49 +02:00
chown -R $app:www-data "$install_dir"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
2024-06-23 09:19:26 +02:00
ynh_script_progression "Adding system configurations related to $app..."
2023-06-05 17:27:49 +02:00
2024-06-23 09:19:26 +02:00
ynh_config_add_phpfpm
2023-06-05 17:27:49 +02:00
2024-06-23 09:19:26 +02:00
ynh_config_add_nginx
2023-06-05 17:27:49 +02:00
2024-06-23 09:19:26 +02:00
ynh_config_add_logrotate
2023-06-05 17:27:49 +02:00
2024-06-23 09:19:26 +02:00
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
2023-06-05 17:27:49 +02:00
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
2024-06-23 09:19:26 +02:00
2023-06-05 17:27:49 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2024-06-23 09:19:26 +02:00
ynh_script_progression "Installation of $app completed"