1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

Merge pull request #26 from YunoHost-Apps/change_url

Change url
This commit is contained in:
yalh76 2019-02-08 23:38:31 +01:00 committed by GitHub
commit a3b998d4c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,9 +90,31 @@ fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# ...
# STOP SERVICE
#=================================================
ynh_systemd_action --action=stop --service_name=$app
#=================================================
# MODIFY A CONFIG FILE
#=================================================
# Change the URL in the configuration file
ynh_replace_string "EXTERNAL_URL=.*" "EXTERNAL_URL=https://$new_domain$new_path" "$final_path/.env"
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
ynh_backup_if_checksum_is_different "$final_path/.env"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum "$final_path/.env"
#=================================================
# START SERVICE
#=================================================
ynh_systemd_action --action=start --service_name=$app
#=================================================
# GENERIC FINALISATION
#=================================================