1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tracim_ynh.git synced 2024-10-01 13:34:52 +02:00
tracim_ynh/scripts/change_url

54 lines
1.9 KiB
Text
Raw Normal View History

2022-04-06 20:56:59 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2022-04-08 03:47:14 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..."
2022-04-06 20:56:59 +02:00
2023-04-27 22:55:37 +02:00
ynh_change_url_nginx_config
2022-04-06 20:56:59 +02:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
2022-04-11 16:00:33 +02:00
# UPDATE A CONFIG FILE
2022-04-06 20:56:59 +02:00
#=================================================
2022-04-11 16:00:33 +02:00
ynh_script_progression --message="Updating a configuration file..."
2023-04-27 22:55:37 +02:00
#REMOVEME?
2022-04-11 16:00:33 +02:00
domain=$new_domain
2023-04-27 22:55:37 +02:00
path=$new_path
2022-04-11 16:00:33 +02:00
2023-04-27 22:55:37 +02:00
ynh_add_config --template="../conf/development.ini.sample" --destination="$install_dir/backend/development.ini"
chmod 400 "$install_dir/backend/development.ini"
chown $app:$app "$install_dir/backend/development.ini"
2022-04-11 16:00:33 +02:00
2023-04-27 22:55:37 +02:00
ynh_add_config --template="../conf/configEnv.json.sample" --destination="$install_dir/frontend/configEnv.json"
chmod 400 "$install_dir/frontend/configEnv.json"
chown $app:$app "$install_dir/frontend/configEnv.json"
2022-04-06 20:56:59 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
2022-04-08 03:47:14 +02:00
ynh_script_progression --message="Starting a systemd service..."
2022-04-06 20:56:59 +02:00
2022-04-08 03:47:14 +02:00
# Start a systemd service
2022-04-13 00:11:54 +02:00
ynh_systemd_action --service_name="uwsgi" --action="restart" --log_path="/var/log/uwsgi/app/$app-web.log" --line_match="spawned uWSGI"
2022-04-06 20:56:59 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2022-04-08 03:47:14 +02:00
ynh_script_progression --message="Change of URL completed for $app"