2023-05-08 16:23:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2023-07-21 09:09:41 +02:00
|
|
|
timezone="$(cat /etc/timezone)"
|
|
|
|
key=$(ynh_string_random --length=18)
|
|
|
|
|
2023-05-08 16:23:02 +02:00
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
|
|
|
|
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2023-07-21 09:04:44 +02:00
|
|
|
#=================================================
|
|
|
|
# ADD A CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|
|
|
|
2023-12-02 16:43:45 +01:00
|
|
|
ynh_add_config --template=".env" --destination="$install_dir/config/.env"
|
2023-07-21 09:04:44 +02:00
|
|
|
|
|
|
|
chmod 400 "$install_dir/config/.env"
|
|
|
|
chown $app:$app "$install_dir/config/.env"
|
|
|
|
|
2023-05-08 16:23:02 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|