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:
parent
484aa10938
commit
ec2d5c30f5
2 changed files with 16 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue