1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jellyfin-vue_ynh.git synced 2024-09-03 19:26:31 +02:00
jellyfin-vue_ynh/scripts/change_url

39 lines
1.3 KiB
Bash

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression "Updating NGINX web server configuration..."
ynh_config_change_url_nginx
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# Build Jellyfin-vue
#=================================================
ynh_script_progression "Building Jellyfin Vue... (this will take some time and resources!)"
# Already patched in install script
# _patch_config_json "$install_dir/source"
rm -rf "$install_dir/www"
_npm_build_install "$install_dir/source" "$install_dir/www" "$path/"
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration..."
# Check if Jellyfin is installed, and configure it as defaultServerURL.
for url in $(_list_jellyfin_urls); do
_append_to_server_urls "$install_dir/www/config.json" "$url"
done
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Change of URL completed for $app"