62 lines
2 KiB
Text
62 lines
2 KiB
Text
|
#!/bin/bash
|
||
|
|
||
|
#=================================================
|
||
|
# GENERIC START
|
||
|
#=================================================
|
||
|
# IMPORT GENERIC HELPERS
|
||
|
#=================================================
|
||
|
|
||
|
source _common.sh
|
||
|
source /usr/share/yunohost/helpers
|
||
|
|
||
|
#=================================================
|
||
|
# MANAGE SCRIPT FAILURE
|
||
|
#=================================================
|
||
|
|
||
|
ynh_clean_setup () {
|
||
|
true
|
||
|
}
|
||
|
# Exit if an error occurs during the execution of the script
|
||
|
ynh_abort_if_errors
|
||
|
|
||
|
#=================================================
|
||
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||
|
#=================================================
|
||
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
||
|
|
||
|
ynh_setup_source --dest_dir="$install_dir"
|
||
|
|
||
|
chown -R $app:www-data "$install_dir"
|
||
|
|
||
|
#=================================================
|
||
|
# Get code from git
|
||
|
#=================================================
|
||
|
# ynh_script_progression --message="Clone from git..." --weight=1
|
||
|
|
||
|
# git clone https://git.distrilab.fr/HyperSupers/spip_hypersupers.git $install_dir
|
||
|
# git config pull.rebase false
|
||
|
|
||
|
#=================================================
|
||
|
# SYSTEM CONFIGURATION
|
||
|
#=================================================
|
||
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||
|
|
||
|
# Create a dedicated PHP-FPM config using the conf/php-fpm.conf or conf/extra_php-fpm.conf
|
||
|
ynh_add_fpm_config
|
||
|
|
||
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||
|
ynh_add_nginx_config
|
||
|
|
||
|
#=================================================
|
||
|
# RELOAD NGINX
|
||
|
#=================================================
|
||
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||
|
|
||
|
ynh_systemd_action --service_name=nginx --action=reload --log_path="/var/log/$app/$app.log"
|
||
|
|
||
|
#=================================================
|
||
|
# END OF SCRIPT
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Installation of $app completed" --last
|