2021-08-28 14:23:48 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=3
|
|
|
|
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
2023-03-30 14:22:39 +02:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
|
|
|
mv $install_dir/Upload/* $install_dir/
|
2023-03-30 14:30:21 +02:00
|
|
|
ynh_secure_remove --file="$install_dir/Documentation"
|
|
|
|
nh_secure_remove --file="$install_dir/Upload"
|
2021-08-28 14:23:48 +02:00
|
|
|
|
2023-03-30 14:22:39 +02:00
|
|
|
chmod 750 "$install_dir"
|
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
|
|
|
#chmod 666 $install_dir/inc/config.php $install_dir/inc/settings.php
|
|
|
|
chmod 775 $install_dir/cache/ $install_dir/cache/themes/ $install_dir/uploads/ $install_dir/uploads/avatars/
|
2021-08-28 14:23:48 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
|
|
|
|
|
|
|
|
# Create a dedicated PHP-FPM config
|
2023-03-30 14:30:21 +02:00
|
|
|
ynh_add_fpm_config --usage=low --footprint=low
|
2021-08-28 14:23:48 +02:00
|
|
|
|
2022-10-19 20:36:18 +02:00
|
|
|
#=================================================
|
|
|
|
# NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|
|
|
|
|
|
|
# Create a dedicated NGINX config
|
|
|
|
ynh_add_nginx_config
|
|
|
|
|
2021-08-28 14:23:48 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|