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

Merge pull request #7 from YunoHost-Apps/try-change_url

Add change url
This commit is contained in:
Thomas 2023-04-13 13:16:06 +02:00 committed by GitHub
commit 1e97f936d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 1 deletions

56
scripts/change_url Normal file
View file

@ -0,0 +1,56 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
admin_mail=$(ynh_user_get_info --username=$admin --key=username)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --action="stop" --service_name="${app}"
ynh_systemd_action --action="stop" --service_name="${app}_workers"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
#=================================================
# MODIFY THE CONFIG FILE
#=================================================
#ynh_script_progression --message="Modifying a config file..." --weight=1
#domain=$new_domain
#ynh_add_config --template="../conf/env.production" --destination="$install_dir/config/.env"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting the systemd services..." --weight=15
# Start a systemd service
ynh_systemd_action --service_name="${app}" --action="start"
ynh_systemd_action --service_name="${app}_workers" --action="start"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last

View file

@ -6,7 +6,6 @@ test_format = 1.0
# Tests to run # Tests to run
# ------------ # ------------
exclude = ["change_url"]
# ------------------------------- # -------------------------------
# Default args to use for install # Default args to use for install