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

63 lines
2 KiB
Text
Raw Normal View History

2021-04-01 12:47:58 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2021-04-01 13:01:57 +02:00
ynh_script_progression --message="Setting up source files..." --weight=1
2021-04-01 12:47:58 +02:00
2023-10-02 22:06:16 +02:00
ynh_setup_source --dest_dir="$install_dir"
2021-04-01 12:47:58 +02:00
2023-10-02 22:06:16 +02:00
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
2021-06-07 17:35:22 +02:00
2021-04-01 12:47:58 +02:00
#=================================================
2023-01-10 11:48:07 +01:00
# PHP-FPM CONFIGURATION
2021-04-01 12:47:58 +02:00
#=================================================
2023-01-10 11:48:07 +01:00
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
2021-04-01 12:47:58 +02:00
2023-10-02 22:06:16 +02:00
ynh_add_fpm_config --usage="$fpm_usage" --footprint="$fpm_footprint"
2021-04-01 12:47:58 +02:00
#=================================================
2023-01-10 11:48:07 +01:00
# NGINX CONFIGURATION
2021-04-01 12:47:58 +02:00
#=================================================
2023-01-10 11:48:07 +01:00
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
2021-04-01 12:47:58 +02:00
2023-01-10 11:48:07 +01:00
ynh_add_nginx_config
2021-04-01 12:47:58 +02:00
2021-06-08 10:37:27 +02:00
#=================================================
2021-06-10 16:57:45 +02:00
# CREATE DATA DIRECTORY
2021-06-08 10:37:27 +02:00
#=================================================
2021-06-10 16:57:45 +02:00
ynh_script_progression --message="Creating a data directory..." --weight=1
2021-06-08 10:37:27 +02:00
2023-10-02 22:06:16 +02:00
chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir"
chown -R "$app:www-data" "$data_dir"
2021-06-08 10:37:27 +02:00
2021-04-01 12:47:58 +02:00
#=================================================
2021-06-07 17:35:22 +02:00
# ADD A CONFIGURATION
2021-04-01 12:47:58 +02:00
#=================================================
2021-06-07 17:35:22 +02:00
ynh_script_progression --message="Adding a configuration file..." --weight=1
2021-04-01 12:47:58 +02:00
2023-10-02 22:06:16 +02:00
ynh_add_config --template="../conf/configuration.ini" --destination="$install_dir/configuration.ini"
2021-04-01 12:47:58 +02:00
2023-10-02 22:06:16 +02:00
chmod 400 "$install_dir/configuration.ini"
chown "$app:$app" "$install_dir/configuration.ini"
2021-04-01 12:47:58 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2021-04-01 13:01:57 +02:00
ynh_script_progression --message="Installation of $app completed" --last