1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/taskboard_ynh.git synced 2024-09-03 20:26:27 +02:00
taskboard_ynh/scripts/install
Éric Gaspar 1aadb51b59 cleaning
2024-06-24 12:01:59 +02:00

47 lines
1.4 KiB
Bash

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
ynh_app_setting_set --key=php_upload_max_filesize --value=100M
ynh_app_setting_set --key=php_memory_limit --value=256M
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod 750 "$install_dir"
chmod 775 "$install_dir/api"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression "Configuring PHP-FPM..."
ynh_config_add_phpfpm
ynh_config_add_nginx
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration..."
dir="__DIR__"
ynh_config_add --template="Mailer.php" --destination="$install_dir/api/helpers/Mailer.php"
chmod 400 "$install_dir/api/helpers/Mailer.php"
chown $app:$app "$install_dir/api/helpers/Mailer.php"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of TaskBoard completed"