2020-12-16 19:56:57 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
|
|
#=================================================
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Setting up source files..."
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2023-03-23 15:26:20 +01:00
|
|
|
ynh_setup_source --dest_dir="$install_dir"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2023-03-23 15:26:20 +01:00
|
|
|
chmod -R o-rwx "$install_dir"
|
|
|
|
chown -R $app:www-data "$install_dir"
|
2021-05-27 13:19:07 +02:00
|
|
|
|
2020-12-16 19:56:57 +01:00
|
|
|
#=================================================
|
|
|
|
# NGINX CONFIGURATION
|
|
|
|
#=================================================
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Configuring NGINX web server..."
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_config_add_nginx
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_config_add_phpfpm
|
2020-12-16 19:56:57 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY A CONFIG FILE
|
|
|
|
#=================================================
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Adding $app's configuration..."
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_config_add --template="config-dist.php" --destination="$install_dir/data/config.php"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
2023-03-23 15:26:20 +01:00
|
|
|
chmod 400 "$install_dir/data/config.php"
|
|
|
|
chown $app "$install_dir/data/config.php"
|
2020-12-16 19:56:57 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-06-24 11:25:39 +02:00
|
|
|
ynh_script_progression "Installation of $app completed"
|