2022-04-23 15:11:56 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2022-04-24 13:32:45 +02:00
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=2
|
2022-04-23 15:11:56 +02:00
|
|
|
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
2023-03-19 14:39:27 +01:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
2022-04-23 15:11:56 +02:00
|
|
|
|
2023-03-19 14:39:27 +01:00
|
|
|
chmod 750 "$install_dir"
|
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
2022-04-23 15:11:56 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2022-04-24 13:32:45 +02:00
|
|
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
|
2022-04-23 15:11:56 +02:00
|
|
|
|
|
|
|
# Create a dedicated NGINX config
|
|
|
|
ynh_add_nginx_config
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2022-04-24 13:32:45 +02:00
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|