mirror of
https://github.com/YunoHost-Apps/mobilizon_ynh.git
synced 2024-09-03 19:46:19 +02:00
Implement change_url
This commit is contained in:
parent
02bb680abc
commit
1f158212ae
1 changed files with 27 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
|
source ynh_systemd_action
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -17,7 +18,7 @@ old_domain=$YNH_APP_OLD_DOMAIN
|
||||||
old_path=$YNH_APP_OLD_PATH
|
old_path=$YNH_APP_OLD_PATH
|
||||||
|
|
||||||
new_domain=$YNH_APP_NEW_DOMAIN
|
new_domain=$YNH_APP_NEW_DOMAIN
|
||||||
new_path=$YNH_APP_NEW_PATH
|
new_path="/"
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -83,9 +84,33 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC MODIFICATIONS
|
# SPECIFIC MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
# ...
|
# STOP SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
ynh_systemd_action --action=stop --service_name=$app
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY A CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_replace_string "$old_domain" "$new_domain" "$final_path/$app/.env"
|
||||||
|
ynh_replace_string "$old_domain" "$new_domain" "$final_path/$app/config/prod.secret.exs"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# START SERVICE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_systemd_action --action=start --service_name=$app --log_path=systemd
|
||||||
|
#--line_match="Running Pleroma.Web.Endpoint"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup_if_checksum_is_different "$final_path/$app/.env"
|
||||||
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
|
ynh_store_file_checksum "$final_path/$app/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue