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

Add change_url

This commit is contained in:
Yalh 2019-01-25 22:16:20 +01:00 committed by yalh76
parent 484aa10938
commit ec2d5c30f5
2 changed files with 16 additions and 2 deletions

View file

@ -29,8 +29,8 @@
backup_restore=1
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=0
port_already_use=1
change_url=1
;;; Levels
Level 1=auto
Level 2=auto

View file

@ -93,6 +93,20 @@ fi
# ...
#=================================================
# Stop writefreely for modification
yunohost service stop "$app"
ynh_replace_string "host =.*" "host =https://$new_domain$new_path" "$final_path/config.ini"
# Start writefreely after modification
yunohost service start $app
### 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/config.ini"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum "$final_path/config.ini"
#=================================================
# GENERIC FINALISATION
#=================================================