#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # STOP SYSTEMD SERVICE #================================================= ynh_script_progression "Stopping $app's systemd service..." ynh_systemctl --service="$app" --action=stop #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression "Updating NGINX web server configuration..." ynh_config_change_url_nginx ynh_script_progression "Updating xwiki configuration..." if [ "$new_path" != "$old_path" ]; then if "$install_on_root"; then mv "$install_dir/webapps$old_path" "$install_dir"/webapps/root elif [ "$path" == /root ]; then ynh_die 'Path "/root" not supported' elif [ $old_path == / ]; then mv "$install_dir"/webapps/root "$install_dir/webapps$new_path" else mv "$install_dir/webapps$old_path" "$install_dir/webapps$new_path" fi fi add_config set_permissions #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression "Starting $app's systemd service..." ynh_systemctl --service="$app" --action=start --log_path=systemd --wait_until="$systemd_match_start_line" wait_xwiki_started #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Change of URL completed for $app"