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

51 lines
2.1 KiB
Text
Raw Normal View History

#!/bin/bash
2015-09-27 00:52:48 +02: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
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
2015-09-27 00:52:56 +02: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
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression "Configuring PHP-FPM..."
2020-11-28 10:09:39 +01:00
# Create a dedicated PHP-FPM config
ynh_config_add_phpfpm
2023-02-07 17:25:11 +01:00
# Create a dedicated NGINX config
ynh_config_add_nginx
2023-02-07 17:25:11 +01:00
2023-06-03 21:45:59 +02:00
# Use logrotate to manage application logfile(s)
ynh_config_add_logrotate
2023-06-03 21:45:59 +02:00
2021-03-02 10:09:52 +01:00
# =================================================
# MODIFY A CONFIG FILE
2021-03-02 10:09:52 +01:00
# =================================================
ynh_script_progression "Modifying $app config file..."
2020-11-28 10:09:39 +01:00
ynh_config_add --template="noalyss.conf" --destination="$install_dir/include/config.inc.php"
2015-09-27 02:54:32 +02:00
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 650 "$install_dir/include/config.inc.php"
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app: "$install_dir/include/config.inc.php"
2021-11-27 08:27:38 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2015-09-28 01:09:37 +02:00
ynh_script_progression "Installation of $app completed"