mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
5bd7d38efa
* cleaning * cleaning * Auto-update README --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org>
51 lines
1.5 KiB
Bash
Executable file
51 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
|
#=================================================
|
|
|
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
|
|
|
fpm_footprint="low"
|
|
fpm_free_footprint=0
|
|
fpm_usage="low"
|
|
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression --message="Setting up source files..." --weight=4
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
|
ynh_setup_source --dest_dir="$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
|
|
|
#=================================================
|
|
# PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
|
|
|
|
# Create a dedicated PHP-FPM config
|
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
|
|
|
# Create a dedicated NGINX config
|
|
ynh_add_nginx_config
|
|
|
|
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
|
chown root: "/etc/cron.d/$app"
|
|
chmod 644 "/etc/cron.d/$app"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|