#!/bin/bash #================================================= # GENERIC STARTING #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # STANDARD MODIFICATIONS #================================================= # STOP SYSTEMD SERVICE #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=15 ynh_change_url_nginx_config # Change the domain for NGINX if [ $change_domain -eq 1 ]; then #adapt permissions for additional URIs ynh_permission_url --permission="main" --add_url="$new_domain/mopidy/ws" --remove_url="$old_domain/mopidy/ws" ynh_permission_url --permission="main" --add_url="$new_domain/local" --remove_url="$old_domain/local" ynh_permission_url --permission="main" --add_url="$new_domain/musicbox_webclient" --remove_url="$old_domain/musicbox_webclient" fi #================================================= # GENERIC FINALISATION #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="$app" --action="start" #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Change of URL completed for $app" --last