mirror of
https://github.com/YunoHost-Apps/jellyfin-vue_ynh.git
synced 2024-09-03 19:26:31 +02:00
57 lines
2.1 KiB
Bash
Executable file
57 lines
2.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression "Setting up source files..."
|
|
|
|
ynh_setup_source --dest_dir="$install_dir/source"
|
|
|
|
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
|
#=================================================
|
|
# INSTALL DEPENDENCIES
|
|
#=================================================
|
|
ynh_script_progression "Installing NodeJS..."
|
|
|
|
# Install Nodejs
|
|
ynh_nodejs_install
|
|
|
|
#=================================================
|
|
# SPECIFIC SETUP
|
|
#=================================================
|
|
# Build Jellyfin-vue
|
|
#=================================================
|
|
ynh_script_progression "Building Jellyfin Vue... (this will take some time and resources!)"
|
|
|
|
_patch_config_json "$install_dir/source"
|
|
_npm_build_install "$install_dir/source" "$install_dir/www" "$path/"
|
|
|
|
#=================================================
|
|
# SYSTEM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Adding system configurations related to $app..."
|
|
|
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
|
ynh_config_add_nginx
|
|
|
|
#=================================================
|
|
# APP INITIAL CONFIGURATION
|
|
#=================================================
|
|
# 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 "Installation of $app completed"
|