1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yeswiki_ynh.git synced 2024-09-03 18:05:56 +02:00

Add change url

This commit is contained in:
Plumf 2020-05-06 13:40:31 +02:00
parent 8b24c70b86
commit 6e08353cb1
2 changed files with 6 additions and 4 deletions

View file

@ -28,7 +28,7 @@
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=1 (66) port_already_use=1 (66)
change_url=0 change_url=1
actions=0 actions=0
config_panel=0 config_panel=0
;;; Levels ;;; Levels

View file

@ -91,10 +91,10 @@ fi
# Change the domain for nginx # Change the domain for nginx
if [ $change_domain -eq 1 ] if [ $change_domain -eq 1 ]
then then
# Delete file checksum for the old conf file location # Delete file checksum for the old conf file location
ynh_delete_file_checksum --file="$nginx_conf_path" ynh_delete_file_checksum --file="$nginx_conf_path"
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
# Store file checksum for the new config file location # Store file checksum for the new config file location
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi fi
@ -104,6 +104,8 @@ fi
# ... # ...
#================================================= #=================================================
ynh_replace_string --match_string="https://$old_domain${old_path%/}" --replace_string="https://$new_domain${new_path%/}" --target_file="$final_path/wakka.config.php"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION
#================================================= #=================================================
@ -117,4 +119,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Change of URL completed for $app" --last ynh_script_progression --message="Change of URL completed for $app" --last