1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jappix_ynh.git synced 2024-09-03 19:26:19 +02:00
jappix_ynh/scripts/install

53 lines
1.7 KiB
Text
Raw Normal View History

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
#=================================================
2020-10-20 23:28:09 +02:00
source _common.sh
2017-03-08 23:32:10 +01:00
source /usr/share/yunohost/helpers
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"
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"
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
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