2013-11-29 12:49:27 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
2020-10-20 23:28:09 +02:00
|
|
|
# GENERIC START
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-05-13 22:29:15 +02:00
|
|
|
|
2020-10-20 23:28:09 +02:00
|
|
|
source _common.sh
|
2017-03-08 23:32:10 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
2015-05-28 14:58:23 +02:00
|
|
|
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
2024-01-07 13:10:56 +01:00
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
2020-11-22 22:17:57 +01:00
|
|
|
#=================================================
|
2024-01-07 13:10:56 +01:00
|
|
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
2020-11-22 22:17:57 +01:00
|
|
|
|
2024-01-07 13:10:56 +01:00
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
2015-05-28 14:58:23 +02:00
|
|
|
|
2024-01-07 13:10:56 +01:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R "$app:www-data" "$install_dir"
|
2017-03-08 23:32:10 +01:00
|
|
|
|
2021-06-20 18:24:46 +02:00
|
|
|
#=================================================
|
2024-01-07 13:10:56 +01:00
|
|
|
# Set Jappix configuration
|
2021-06-20 18:24:46 +02:00
|
|
|
#=================================================
|
2024-01-07 13:10:56 +01:00
|
|
|
ynh_script_progression --message="Configuring Jappix..." --weight=1
|
2021-06-20 18:24:46 +02:00
|
|
|
|
2024-01-07 13:10:56 +01:00
|
|
|
mkdir -p "$install_dir/store/conf"
|
2017-03-08 23:32:10 +01:00
|
|
|
|
2024-01-07 13:10:56 +01:00
|
|
|
ynh_add_config --template="../conf/hosts.xml" --destination="$install_dir/store/conf/hosts.xml"
|
|
|
|
ynh_add_config --template="../conf/main.xml" --destination="$install_dir/store/conf/main.xml"
|
|
|
|
ynh_add_config --template="../conf/installed.xml" --destination="$install_dir/store/conf/installed.xml"
|
2017-03-08 23:32:10 +01:00
|
|
|
|
2024-01-07 13:10:56 +01:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R "$app:www-data" "$install_dir"
|
2016-05-13 22:29:15 +02:00
|
|
|
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
2024-01-07 13:10:56 +01:00
|
|
|
# SYSTEM CONFIGURATION
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
2024-01-07 13:10:56 +01:00
|
|
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
2020-11-22 22:02:51 +01:00
|
|
|
|
|
|
|
# Create a dedicated nginx config
|
|
|
|
ynh_add_nginx_config
|
2016-05-13 22:29:15 +02:00
|
|
|
|
2021-07-21 14:51:44 +02:00
|
|
|
# Create a dedicated PHP-FPM config
|
|
|
|
ynh_add_fpm_config
|
2020-10-20 23:28:09 +02:00
|
|
|
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
2020-10-20 23:28:09 +02:00
|
|
|
# END OF SCRIPT
|
2017-03-08 23:32:10 +01:00
|
|
|
#=================================================
|
|
|
|
|
2020-10-20 23:28:09 +02:00
|
|
|
ynh_script_progression --message="Installation of $app completed" --last
|