From a898a373d55b6bea5f1ca5038eefb5a917488a44 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Fri, 7 Mar 2025 21:46:46 -0500 Subject: [PATCH 01/64] chore: json info --- json/fileflows.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 json/fileflows.json diff --git a/json/fileflows.json b/json/fileflows.json new file mode 100644 index 0000000..ddc6ca0 --- /dev/null +++ b/json/fileflows.json @@ -0,0 +1,39 @@ +{ + "name": "FileFlows", + "slug": "fileflows", + "categories": [ + 13 + ], + "date_created": "2025-03-07", + "type": "ct", + "updateable": true, + "privileged": true, + "interface_port": 19200, + "documentation": "https://fileflows.com/docs", + "website": "https://fileflows.com/", + "logo": "https://raw.githubusercontent.com/revenz/FileFlows/refs/heads/develop/icon.png", + "description": "FileFlows is a powerful, open-source tool for automating media file processing workflows, including encoding, decoding, and media management. It offers an intuitive GUI and extensive plugin support, making it ideal for tasks like video transcoding, organizing, and managing large media libraries.", + "install_methods": [ + { + "type": "default", + "script": "ct/fileflows.sh", + "resources": { + "cpu": 2, + "ram": 2, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "With Privileged/Unprivileged Hardware Acceleration Support", + "type": "info" + } + ] +} From 17125a45bd4255a85bbb8a0861a3993e240f7a59 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Fri, 7 Mar 2025 22:52:36 -0500 Subject: [PATCH 02/64] feat: fileflows ct and install Testing if this works --- ct/fileflows.sh | 77 ++++++++++++++++++++++++++++++++++++ install/fileflows-install.sh | 67 +++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 ct/fileflows.sh create mode 100644 install/fileflows-install.sh diff --git a/ct/fileflows.sh b/ct/fileflows.sh new file mode 100644 index 0000000..7906302 --- /dev/null +++ b/ct/fileflows.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kkroboth +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://fileflows.com/ + +APP="FileFlows" +var_tags="media;automation" +var_cpu="2" +var_ram="2048" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + # Check if installation is present | -f for file, -d for folder + if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + # Crawling the new version and checking whether an update is required + RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND]) + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + # Stopping Services + msg_info "Stopping $APP" + systemctl stop [SERVICE_NAME] + msg_ok "Stopped $APP" + + # Creating Backup + msg_info "Creating Backup" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS] + msg_ok "Backup Created" + + # Execute Update + msg_info "Updating $APP to v${RELEASE}" + [UPDATE_COMMANDS] + msg_ok "Updated $APP to v${RELEASE}" + + # Starting Services + msg_info "Starting $APP" + systemctl start [SERVICE_NAME] + msg_ok "Started $APP" + + # Cleaning up + msg_info "Cleaning Up" + rm -rf [TEMP_FILES] + msg_ok "Cleanup Completed" + + # Last Action + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh new file mode 100644 index 0000000..f5f0a04 --- /dev/null +++ b/install/fileflows-install.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kkroboth +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://fileflows.com/ + +# Import Functions und Setup +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Installing Dependencies with the 3 core dependencies (curl;sudo;mc) +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing ASP.NET Core Runtime" +wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +$STD dpkg -i packages-microsoft-prod.deb +rm -rf packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y aspnetcore-runtime-8.0 +msg_ok "Installed ASP.NET Core Runtime" + +# Setup App +msg_info "Setup ${APPLICATION}" +temp_file=$(mktemp) +wget -q https://fileflows.com/downloads/zip -O $temp_file +unzip -q -d /opt/fileflows $temp_file +chmod +x /opt/fileflows/run-server.sh +msg_ok "Setup ${APPLICATION}" + +# Creating Service +msg_info "Creating Service" +cat </etc/systemd/system/${APPLICATION}.service +[Unit] +Description=${APPLICATION} Service +After=network.target + +[Service] +WorkingDirectory=/opt/wastebin +ExecStart=dotnet FileFlows.Server.dll +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ${APPLICATION}.service +msg_ok "Created Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 0a2722ee95bf7d685989d116fba60cd49d8e7e3a Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Fri, 7 Mar 2025 23:34:33 -0500 Subject: [PATCH 03/64] fix: update build.func link --- ct/fileflows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 7906302..f418786 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: kkroboth # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE From 9ff05c6cc9f805eb7bddff82f8eddb12ca272bdb Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sat, 8 Mar 2025 00:16:14 -0500 Subject: [PATCH 04/64] fix: hardware accel and naming issues --- install/fileflows-install.sh | 34 ++++++++++++++++++++++++++++++---- misc/build.func | 8 ++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index f5f0a04..cefe333 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -22,6 +22,30 @@ $STD apt-get install -y \ mc msg_ok "Installed Dependencies" +msg_info "Installing FFmpeg (Patience)" +wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb +$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb +cat </etc/apt/sources.list.d/backports.list +deb https://www.deb-multimedia.org bookworm main non-free +deb https://www.deb-multimedia.org bookworm-backports main +EOF +$STD apt update +DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y +rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb +$STD apt update +msg_ok "Installed FFmpeg" + +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +if [[ "$CTTYPE" == "0" ]]; then + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render +fi +msg_ok "Set Up Hardware Acceleration" + msg_info "Installing ASP.NET Core Runtime" wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb @@ -40,20 +64,22 @@ msg_ok "Setup ${APPLICATION}" # Creating Service msg_info "Creating Service" -cat </etc/systemd/system/${APPLICATION}.service +cat </etc/systemd/system/fileflows.service [Unit] Description=${APPLICATION} Service After=network.target [Service] -WorkingDirectory=/opt/wastebin -ExecStart=dotnet FileFlows.Server.dll +WorkingDirectory=/opt/fileflows +ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh +SyslogIdentifier=FileFlows Restart=always +RestartSec=10 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now ${APPLICATION}.service +systemctl enable -q --now fileflows.service msg_ok "Created Service" motd_ssh diff --git a/misc/build.func b/misc/build.func index bd55da0..6b82441 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1135,7 +1135,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm @@ -1147,7 +1147,7 @@ lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,creat EOF fi else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then if [[ -e "/dev/dri/renderD128" ]]; then if [[ -e "/dev/dri/card0" ]]; then cat <>$LXC_CONFIG @@ -1201,7 +1201,7 @@ description() { spend Coffee

- + GitHub @@ -1250,7 +1250,7 @@ exit_script() { #200 exit codes indicate error in create_lxc.sh #100 exit codes indicate error in install.func - if [ $exit_code -ne 0 ]; then + if [ $exit_code -ne 0 ]; then case $exit_code in 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; From 8d22ce9ba9d11d3768f9a83b0a397a4cf70c4383 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sat, 8 Mar 2025 23:58:31 -0500 Subject: [PATCH 05/64] chore: fileflows update script --- ct/fileflows.sh | 31 ++++++++++++++++--------------- install/fileflows-install.sh | 5 +++-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index f418786..fb458a4 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -25,45 +25,46 @@ function update_script() { check_container_resources # Check if installation is present | -f for file, -d for folder - if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then + if [[ ! -d /opt/fileflows ]]; then msg_error "No ${APP} Installation Found!" exit fi - # Crawling the new version and checking whether an update is required - RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND]) - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - # Stopping Services + UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://${IP}:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) + if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then msg_info "Stopping $APP" - systemctl stop [SERVICE_NAME] + systemctl stop fileflows msg_ok "Stopped $APP" # Creating Backup msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS] + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" -C /opt/fileflows Data msg_ok "Backup Created" # Execute Update - msg_info "Updating $APP to v${RELEASE}" - [UPDATE_COMMANDS] - msg_ok "Updated $APP to v${RELEASE}" + msg_info "Updating $APP to latest version" + temp_file=$(mktemp) + wget -q https://fileflows.com/downloads/zip -O $temp_file + unzip -oq -d /opt/fileflows $temp_file + chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh + msg_ok "Updated $APP to latest version" # Starting Services msg_info "Starting $APP" - systemctl start [SERVICE_NAME] + systemctl start fileflows msg_ok "Started $APP" # Cleaning up msg_info "Cleaning Up" - rm -rf [TEMP_FILES] + rm -rf $temp_file msg_ok "Cleanup Completed" # Last Action - echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Update Successful" else - msg_ok "No update required. ${APP} is already at v${RELEASE}" + msg_ok "No update required. ${APP} is already at latest version" fi + exit } @@ -74,4 +75,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:19200${CL}" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index cefe333..23d56ed 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -19,7 +19,8 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ sudo \ - mc + mc \ + jq # Used for updating checking from json response msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" @@ -59,7 +60,7 @@ msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file -chmod +x /opt/fileflows/run-server.sh +chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh msg_ok "Setup ${APPLICATION}" # Creating Service From 5d189e5d604592d59146eea43debf9e887ba3399 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 9 Mar 2025 00:42:13 -0500 Subject: [PATCH 06/64] test: update misc links --- misc/build.func | 14 +++++++------- misc/install.func | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index 6b82441..2511838 100644 --- a/misc/build.func +++ b/misc/build.func @@ -14,7 +14,7 @@ variables() { RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -69,7 +69,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -1082,9 +1082,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" @@ -1116,7 +1116,7 @@ build_container() { $PW " # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/create_lxc.sh)" || exit $? LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -1178,7 +1178,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/install/$var_install.sh)" || exit $? } @@ -1191,7 +1191,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index 98e4418..f37d199 100644 --- a/misc/install.func +++ b/misc/install.func @@ -68,7 +68,7 @@ catch_errors() { # This function handles errors error_handler() { - source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source <(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" From dfe9980f09676777e0047fdb56bb2523cbba82e0 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 9 Mar 2025 00:51:20 -0500 Subject: [PATCH 07/64] fix: use built-in systemd installer --- ct/fileflows.sh | 1 - install/fileflows-install.sh | 18 ++---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index fb458a4..6f70fda 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -46,7 +46,6 @@ function update_script() { temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -oq -d /opt/fileflows $temp_file - chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh msg_ok "Updated $APP to latest version" # Starting Services diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 23d56ed..a4c6565 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -60,26 +60,12 @@ msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file -chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh +(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) msg_ok "Setup ${APPLICATION}" # Creating Service msg_info "Creating Service" -cat </etc/systemd/system/fileflows.service -[Unit] -Description=${APPLICATION} Service -After=network.target - -[Service] -WorkingDirectory=/opt/fileflows -ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh -SyslogIdentifier=FileFlows -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target -EOF +(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) systemctl enable -q --now fileflows.service msg_ok "Created Service" From cb95b41f9217efbda8f6f6f91c995ad58c94d942 Mon Sep 17 00:00:00 2001 From: kkroboth Date: Tue, 11 Mar 2025 20:49:11 -0400 Subject: [PATCH 08/64] chore: update multimedia keys --- install/fileflows-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index a4c6565..6815afd 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -24,8 +24,8 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" -wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb -$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb +wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb +$STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb cat </etc/apt/sources.list.d/backports.list deb https://www.deb-multimedia.org bookworm main non-free deb https://www.deb-multimedia.org bookworm-backports main From 7691f655fc4cf944f78d748d7c498a9f66cc1c8d Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 21:22:14 -0400 Subject: [PATCH 09/64] fix: use non-free intel va driver --- install/fileflows-install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 6815afd..26c7c3f 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -37,7 +37,19 @@ $STD apt update msg_ok "Installed FFmpeg" msg_info "Setting Up Hardware Acceleration" -$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +cat </etc/apt/sources.list.d/non-free.list + +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware + +deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware + +deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +EOF +$STD apt-get update +$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then chgrp video /dev/dri chmod 755 /dev/dri From 5f1f6d3684aa73e3b402bae906ea07952b1882ac Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 21:31:23 -0400 Subject: [PATCH 10/64] fix: quiet logs and remove duplicate service install --- install/fileflows-install.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 26c7c3f..bcb7c3a 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" -wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb +wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb $STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb cat </etc/apt/sources.list.d/backports.list deb https://www.deb-multimedia.org bookworm main non-free @@ -73,13 +73,8 @@ temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file (cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) -msg_ok "Setup ${APPLICATION}" - -# Creating Service -msg_info "Creating Service" -(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) systemctl enable -q --now fileflows.service -msg_ok "Created Service" +msg_ok "Setup ${APPLICATION}" motd_ssh customize From 19c92a47803814e3e903bbb41d4dfe1dee24babf Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:02:53 -0400 Subject: [PATCH 11/64] chore: option to install non-free HW accel --- install/fileflows-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index bcb7c3a..e55f759 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -37,6 +37,10 @@ $STD apt update msg_ok "Installed FFmpeg" msg_info "Setting Up Hardware Acceleration" + +read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Hardware Acceleration (non-free)" cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware @@ -50,6 +54,11 @@ deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non- EOF $STD apt-get update $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +else + msg_info "Installing Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +fi + if [[ "$CTTYPE" == "0" ]]; then chgrp video /dev/dri chmod 755 /dev/dri @@ -57,6 +66,7 @@ if [[ "$CTTYPE" == "0" ]]; then $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render fi +msg_ok "Installed Hardware Acceleration" msg_ok "Set Up Hardware Acceleration" msg_info "Installing ASP.NET Core Runtime" From b56d48950680974b57af5cc3611d41f648c0981b Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:42:08 -0400 Subject: [PATCH 12/64] fix: set up ffmpeg and ffprobe to correct paths --- install/fileflows-install.sh | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index e55f759..4bd1e1b 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -14,6 +14,19 @@ setting_up_container network_check update_os +wait_for_api() { + echo "Waiting for API to become available..." + while true; do + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://${IP}:19200/api/system/info") + if [ "$HTTP_STATUS" -eq 200 ]; then + echo "API is now available!" + break + fi + echo "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." + sleep 5 + done +} + # Installing Dependencies with the 3 core dependencies (curl;sudo;mc) msg_info "Installing Dependencies" $STD apt-get install -y \ @@ -86,6 +99,50 @@ unzip -q -d /opt/fileflows $temp_file systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" +# Modify ffmpeg and ffprobe variables so they point to correct locations +msg_info "Setting ffmpeg variables in fileflows" +wait_for_api + +FFMPEG_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') +echo "ffmpeg UID: $FFMPEG_UID" + +FFPROBE_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') +echo "ffprobe UID: $FFPROBE_UID" + +curl -X 'DELETE' \ + "http://${IP}:19200/api/variable" \ + -H 'accept: */*' \ + -H 'Content-Type: application/json' \ + -d "{ + \"Uids\": [ + \"$FFMPEG_UID\", + \"$FFPROBE_UID\" + ] +}" + +FFMPEG_PATH=$(which ffmpeg) +FFPROBE_PATH=$(which ffprobe) + +curl -X 'POST' \ + "http://${IP}:19200/api/variable" \ + -H 'accept: */*' \ + -H 'Content-Type: application/json' \ + -d "{ + \"Name\": \"ffmpeg\", + \"Value\": \"$FFMPEG_PATH\" +}" + +curl -X 'POST' \ + "http://${IP}:19200/api/variable" \ + -H 'accept: */*' \ + -H 'Content-Type: application/json' \ + -d "{ + \"Name\": \"ffprobe\", + \"Value\": \"$FFPROBE_PATH\" +}" + +echo "ffmpeg and ffprobe variables have been updated successfully." + motd_ssh customize From ca686af9ee0c99de56f6e0bce11a4dd0d06c9219 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:47:34 -0400 Subject: [PATCH 13/64] fix: use localhost --- install/fileflows-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 4bd1e1b..d5f8be0 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -17,7 +17,7 @@ update_os wait_for_api() { echo "Waiting for API to become available..." while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://${IP}:19200/api/system/info") + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info") if [ "$HTTP_STATUS" -eq 200 ]; then echo "API is now available!" break @@ -103,14 +103,14 @@ msg_ok "Setup ${APPLICATION}" msg_info "Setting ffmpeg variables in fileflows" wait_for_api -FFMPEG_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') +FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') echo "ffmpeg UID: $FFMPEG_UID" -FFPROBE_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') +FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') echo "ffprobe UID: $FFPROBE_UID" curl -X 'DELETE' \ - "http://${IP}:19200/api/variable" \ + "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d "{ @@ -124,7 +124,7 @@ FFMPEG_PATH=$(which ffmpeg) FFPROBE_PATH=$(which ffprobe) curl -X 'POST' \ - "http://${IP}:19200/api/variable" \ + "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d "{ @@ -133,7 +133,7 @@ curl -X 'POST' \ }" curl -X 'POST' \ - "http://${IP}:19200/api/variable" \ + "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d "{ From c00bb973432b093dbd00d022ff1d92c0cfc80b53 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:54:48 -0400 Subject: [PATCH 14/64] fix: ignore errors --- install/fileflows-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index d5f8be0..69afefa 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -15,14 +15,14 @@ network_check update_os wait_for_api() { - echo "Waiting for API to become available..." + msg_info "Waiting for API to become available..." while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info") + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") if [ "$HTTP_STATUS" -eq 200 ]; then - echo "API is now available!" + msg_info "API is now available!" break fi - echo "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." + msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." sleep 5 done } @@ -141,7 +141,7 @@ curl -X 'POST' \ \"Value\": \"$FFPROBE_PATH\" }" -echo "ffmpeg and ffprobe variables have been updated successfully." +msg_ok "ffmpeg and ffprobe variables have been updated successfully." motd_ssh customize From d3382ec5187e542ee420c50d408df536fe37c865 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:58:30 -0400 Subject: [PATCH 15/64] fix: silent curl --- install/fileflows-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 69afefa..dc501cb 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -109,7 +109,7 @@ echo "ffmpeg UID: $FFMPEG_UID" FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') echo "ffprobe UID: $FFPROBE_UID" -curl -X 'DELETE' \ +curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -123,7 +123,7 @@ curl -X 'DELETE' \ FFMPEG_PATH=$(which ffmpeg) FFPROBE_PATH=$(which ffprobe) -curl -X 'POST' \ +curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -132,7 +132,7 @@ curl -X 'POST' \ \"Value\": \"$FFMPEG_PATH\" }" -curl -X 'POST' \ +curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ From 39407080e9df94600cb0f62dc475cfe83e590d0c Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:01:01 -0400 Subject: [PATCH 16/64] fix: remove debug echos --- install/fileflows-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index dc501cb..f8f75db 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -104,10 +104,7 @@ msg_info "Setting ffmpeg variables in fileflows" wait_for_api FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') -echo "ffmpeg UID: $FFMPEG_UID" - FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') -echo "ffprobe UID: $FFPROBE_UID" curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ From c590df969f68d7593320811e0153d48189c56364 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:05:28 -0400 Subject: [PATCH 17/64] fix: silent curl --- install/fileflows-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index f8f75db..1e524f2 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -127,7 +127,7 @@ curl -s -X 'POST' \ -d "{ \"Name\": \"ffmpeg\", \"Value\": \"$FFMPEG_PATH\" -}" +}" 2>/dev/null curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ @@ -136,7 +136,7 @@ curl -s -X 'POST' \ -d "{ \"Name\": \"ffprobe\", \"Value\": \"$FFPROBE_PATH\" -}" +}" 2>/dev/null msg_ok "ffmpeg and ffprobe variables have been updated successfully." From 37df296a9c0cc644f9633425d3e06274df0fdbdb Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:09:42 -0400 Subject: [PATCH 18/64] fix: silent curl --- install/fileflows-install.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 1e524f2..960267f 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -124,19 +124,13 @@ curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{ - \"Name\": \"ffmpeg\", - \"Value\": \"$FFMPEG_PATH\" -}" 2>/dev/null + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" /dev/null curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{ - \"Name\": \"ffprobe\", - \"Value\": \"$FFPROBE_PATH\" -}" 2>/dev/null + -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" /dev/null msg_ok "ffmpeg and ffprobe variables have been updated successfully." From 2a0b6caeacd776ae5e32da889ac26442dd26dac1 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:12:20 -0400 Subject: [PATCH 19/64] fix: silent curl --- install/fileflows-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 960267f..ca2d844 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -106,7 +106,7 @@ wait_for_api FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') -curl -s -X 'DELETE' \ +$STD curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -120,17 +120,17 @@ curl -s -X 'DELETE' \ FFMPEG_PATH=$(which ffmpeg) FFPROBE_PATH=$(which ffprobe) -curl -s -X 'POST' \ +$STD curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" /dev/null + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" -curl -s -X 'POST' \ +$STD curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" /dev/null + -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" msg_ok "ffmpeg and ffprobe variables have been updated successfully." From e6d0dd6bb9b0415cb10add95fbad763eac9ec2c8 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Fri, 7 Mar 2025 21:46:46 -0500 Subject: [PATCH 20/64] chore: json info --- json/fileflows.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 json/fileflows.json diff --git a/json/fileflows.json b/json/fileflows.json new file mode 100644 index 0000000..ddc6ca0 --- /dev/null +++ b/json/fileflows.json @@ -0,0 +1,39 @@ +{ + "name": "FileFlows", + "slug": "fileflows", + "categories": [ + 13 + ], + "date_created": "2025-03-07", + "type": "ct", + "updateable": true, + "privileged": true, + "interface_port": 19200, + "documentation": "https://fileflows.com/docs", + "website": "https://fileflows.com/", + "logo": "https://raw.githubusercontent.com/revenz/FileFlows/refs/heads/develop/icon.png", + "description": "FileFlows is a powerful, open-source tool for automating media file processing workflows, including encoding, decoding, and media management. It offers an intuitive GUI and extensive plugin support, making it ideal for tasks like video transcoding, organizing, and managing large media libraries.", + "install_methods": [ + { + "type": "default", + "script": "ct/fileflows.sh", + "resources": { + "cpu": 2, + "ram": 2, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "With Privileged/Unprivileged Hardware Acceleration Support", + "type": "info" + } + ] +} From aa822b1352f850a4d14f242f29ecd91bb44988f8 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Fri, 7 Mar 2025 22:52:36 -0500 Subject: [PATCH 21/64] feat: fileflows ct and install Testing if this works --- ct/fileflows.sh | 77 ++++++++++++++++++++++++++++++++++++ install/fileflows-install.sh | 67 +++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 ct/fileflows.sh create mode 100644 install/fileflows-install.sh diff --git a/ct/fileflows.sh b/ct/fileflows.sh new file mode 100644 index 0000000..7906302 --- /dev/null +++ b/ct/fileflows.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kkroboth +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://fileflows.com/ + +APP="FileFlows" +var_tags="media;automation" +var_cpu="2" +var_ram="2048" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + # Check if installation is present | -f for file, -d for folder + if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + # Crawling the new version and checking whether an update is required + RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND]) + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + # Stopping Services + msg_info "Stopping $APP" + systemctl stop [SERVICE_NAME] + msg_ok "Stopped $APP" + + # Creating Backup + msg_info "Creating Backup" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS] + msg_ok "Backup Created" + + # Execute Update + msg_info "Updating $APP to v${RELEASE}" + [UPDATE_COMMANDS] + msg_ok "Updated $APP to v${RELEASE}" + + # Starting Services + msg_info "Starting $APP" + systemctl start [SERVICE_NAME] + msg_ok "Started $APP" + + # Cleaning up + msg_info "Cleaning Up" + rm -rf [TEMP_FILES] + msg_ok "Cleanup Completed" + + # Last Action + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh new file mode 100644 index 0000000..f5f0a04 --- /dev/null +++ b/install/fileflows-install.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kkroboth +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://fileflows.com/ + +# Import Functions und Setup +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +# Installing Dependencies with the 3 core dependencies (curl;sudo;mc) +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing ASP.NET Core Runtime" +wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +$STD dpkg -i packages-microsoft-prod.deb +rm -rf packages-microsoft-prod.deb +$STD apt-get update +$STD apt-get install -y aspnetcore-runtime-8.0 +msg_ok "Installed ASP.NET Core Runtime" + +# Setup App +msg_info "Setup ${APPLICATION}" +temp_file=$(mktemp) +wget -q https://fileflows.com/downloads/zip -O $temp_file +unzip -q -d /opt/fileflows $temp_file +chmod +x /opt/fileflows/run-server.sh +msg_ok "Setup ${APPLICATION}" + +# Creating Service +msg_info "Creating Service" +cat </etc/systemd/system/${APPLICATION}.service +[Unit] +Description=${APPLICATION} Service +After=network.target + +[Service] +WorkingDirectory=/opt/wastebin +ExecStart=dotnet FileFlows.Server.dll +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ${APPLICATION}.service +msg_ok "Created Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From e2621e3ebcc4bcd3dc483a96b48d35fcab57dc8c Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Fri, 7 Mar 2025 23:34:33 -0500 Subject: [PATCH 22/64] fix: update build.func link --- ct/fileflows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 7906302..f418786 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: kkroboth # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE From c8017cf4915c25a6787f4742350971afd6123558 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sat, 8 Mar 2025 00:16:14 -0500 Subject: [PATCH 23/64] fix: hardware accel and naming issues --- install/fileflows-install.sh | 34 ++++++++++++++++++++++++++++++---- misc/build.func | 4 ++-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index f5f0a04..cefe333 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -22,6 +22,30 @@ $STD apt-get install -y \ mc msg_ok "Installed Dependencies" +msg_info "Installing FFmpeg (Patience)" +wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb +$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb +cat </etc/apt/sources.list.d/backports.list +deb https://www.deb-multimedia.org bookworm main non-free +deb https://www.deb-multimedia.org bookworm-backports main +EOF +$STD apt update +DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y +rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb +$STD apt update +msg_ok "Installed FFmpeg" + +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +if [[ "$CTTYPE" == "0" ]]; then + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render +fi +msg_ok "Set Up Hardware Acceleration" + msg_info "Installing ASP.NET Core Runtime" wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb @@ -40,20 +64,22 @@ msg_ok "Setup ${APPLICATION}" # Creating Service msg_info "Creating Service" -cat </etc/systemd/system/${APPLICATION}.service +cat </etc/systemd/system/fileflows.service [Unit] Description=${APPLICATION} Service After=network.target [Service] -WorkingDirectory=/opt/wastebin -ExecStart=dotnet FileFlows.Server.dll +WorkingDirectory=/opt/fileflows +ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh +SyslogIdentifier=FileFlows Restart=always +RestartSec=10 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now ${APPLICATION}.service +systemctl enable -q --now fileflows.service msg_ok "Created Service" motd_ssh diff --git a/misc/build.func b/misc/build.func index dd4e142..b8479c0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1140,7 +1140,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm @@ -1152,7 +1152,7 @@ lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,creat EOF fi else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then if [[ -e "/dev/dri/renderD128" ]]; then if [[ -e "/dev/dri/card0" ]]; then cat <>$LXC_CONFIG From 3cac6c9ffb4f78df07033dfd194e075111dec22b Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sat, 8 Mar 2025 23:58:31 -0500 Subject: [PATCH 24/64] chore: fileflows update script --- ct/fileflows.sh | 31 ++++++++++++++++--------------- install/fileflows-install.sh | 5 +++-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index f418786..fb458a4 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -25,45 +25,46 @@ function update_script() { check_container_resources # Check if installation is present | -f for file, -d for folder - if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then + if [[ ! -d /opt/fileflows ]]; then msg_error "No ${APP} Installation Found!" exit fi - # Crawling the new version and checking whether an update is required - RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND]) - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - # Stopping Services + UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://${IP}:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) + if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then msg_info "Stopping $APP" - systemctl stop [SERVICE_NAME] + systemctl stop fileflows msg_ok "Stopped $APP" # Creating Backup msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS] + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" -C /opt/fileflows Data msg_ok "Backup Created" # Execute Update - msg_info "Updating $APP to v${RELEASE}" - [UPDATE_COMMANDS] - msg_ok "Updated $APP to v${RELEASE}" + msg_info "Updating $APP to latest version" + temp_file=$(mktemp) + wget -q https://fileflows.com/downloads/zip -O $temp_file + unzip -oq -d /opt/fileflows $temp_file + chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh + msg_ok "Updated $APP to latest version" # Starting Services msg_info "Starting $APP" - systemctl start [SERVICE_NAME] + systemctl start fileflows msg_ok "Started $APP" # Cleaning up msg_info "Cleaning Up" - rm -rf [TEMP_FILES] + rm -rf $temp_file msg_ok "Cleanup Completed" # Last Action - echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Update Successful" else - msg_ok "No update required. ${APP} is already at v${RELEASE}" + msg_ok "No update required. ${APP} is already at latest version" fi + exit } @@ -74,4 +75,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:19200${CL}" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index cefe333..23d56ed 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -19,7 +19,8 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ sudo \ - mc + mc \ + jq # Used for updating checking from json response msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" @@ -59,7 +60,7 @@ msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file -chmod +x /opt/fileflows/run-server.sh +chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh msg_ok "Setup ${APPLICATION}" # Creating Service From d567436579d3a18181974894a362aa3ec39ad060 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 9 Mar 2025 00:42:13 -0500 Subject: [PATCH 25/64] test: update misc links --- misc/build.func | 14 +++++++------- misc/install.func | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index b8479c0..af820ad 100644 --- a/misc/build.func +++ b/misc/build.func @@ -14,7 +14,7 @@ variables() { RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -69,7 +69,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -1084,9 +1084,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" @@ -1121,7 +1121,7 @@ build_container() { # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/create_lxc.sh)" || exit $? LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -1183,7 +1183,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/install/$var_install.sh)" || exit $? } @@ -1196,7 +1196,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index 98e4418..f37d199 100644 --- a/misc/install.func +++ b/misc/install.func @@ -68,7 +68,7 @@ catch_errors() { # This function handles errors error_handler() { - source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source <(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" From 54c6fc7b8d718b49fa9c0ffc739f325702c01d61 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 9 Mar 2025 00:51:20 -0500 Subject: [PATCH 26/64] fix: use built-in systemd installer --- ct/fileflows.sh | 1 - install/fileflows-install.sh | 18 ++---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index fb458a4..6f70fda 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -46,7 +46,6 @@ function update_script() { temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -oq -d /opt/fileflows $temp_file - chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh msg_ok "Updated $APP to latest version" # Starting Services diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 23d56ed..a4c6565 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -60,26 +60,12 @@ msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file -chmod +x /opt/fileflows/fileflows-systemd-entrypoint.sh +(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) msg_ok "Setup ${APPLICATION}" # Creating Service msg_info "Creating Service" -cat </etc/systemd/system/fileflows.service -[Unit] -Description=${APPLICATION} Service -After=network.target - -[Service] -WorkingDirectory=/opt/fileflows -ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh -SyslogIdentifier=FileFlows -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target -EOF +(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) systemctl enable -q --now fileflows.service msg_ok "Created Service" From 1dd60223ea431fbdde6fa549b326761f7505f877 Mon Sep 17 00:00:00 2001 From: kkroboth Date: Tue, 11 Mar 2025 20:49:11 -0400 Subject: [PATCH 27/64] chore: update multimedia keys --- install/fileflows-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index a4c6565..6815afd 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -24,8 +24,8 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" -wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb -$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb +wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb +$STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb cat </etc/apt/sources.list.d/backports.list deb https://www.deb-multimedia.org bookworm main non-free deb https://www.deb-multimedia.org bookworm-backports main From c8d296bd2338ab847a1d66532573daeefbfb684e Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 21:22:14 -0400 Subject: [PATCH 28/64] fix: use non-free intel va driver --- install/fileflows-install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 6815afd..26c7c3f 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -37,7 +37,19 @@ $STD apt update msg_ok "Installed FFmpeg" msg_info "Setting Up Hardware Acceleration" -$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +cat </etc/apt/sources.list.d/non-free.list + +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware + +deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware + +deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +EOF +$STD apt-get update +$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} if [[ "$CTTYPE" == "0" ]]; then chgrp video /dev/dri chmod 755 /dev/dri From 887338060a2af60591d6e621cf0f492341883e18 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 21:31:23 -0400 Subject: [PATCH 29/64] fix: quiet logs and remove duplicate service install --- install/fileflows-install.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 26c7c3f..bcb7c3a 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" -wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb +wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb $STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb cat </etc/apt/sources.list.d/backports.list deb https://www.deb-multimedia.org bookworm main non-free @@ -73,13 +73,8 @@ temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file (cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) -msg_ok "Setup ${APPLICATION}" - -# Creating Service -msg_info "Creating Service" -(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) systemctl enable -q --now fileflows.service -msg_ok "Created Service" +msg_ok "Setup ${APPLICATION}" motd_ssh customize From 3c9f47026c53c3a66fa16d1ebdb098bdb9f032d8 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:02:53 -0400 Subject: [PATCH 30/64] chore: option to install non-free HW accel --- install/fileflows-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index bcb7c3a..e55f759 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -37,6 +37,10 @@ $STD apt update msg_ok "Installed FFmpeg" msg_info "Setting Up Hardware Acceleration" + +read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Hardware Acceleration (non-free)" cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware @@ -50,6 +54,11 @@ deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non- EOF $STD apt-get update $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +else + msg_info "Installing Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +fi + if [[ "$CTTYPE" == "0" ]]; then chgrp video /dev/dri chmod 755 /dev/dri @@ -57,6 +66,7 @@ if [[ "$CTTYPE" == "0" ]]; then $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render fi +msg_ok "Installed Hardware Acceleration" msg_ok "Set Up Hardware Acceleration" msg_info "Installing ASP.NET Core Runtime" From 9b89f54c70c0313d8d629e8a8fd3da2b4cd579bb Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:42:08 -0400 Subject: [PATCH 31/64] fix: set up ffmpeg and ffprobe to correct paths --- install/fileflows-install.sh | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index e55f759..4bd1e1b 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -14,6 +14,19 @@ setting_up_container network_check update_os +wait_for_api() { + echo "Waiting for API to become available..." + while true; do + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://${IP}:19200/api/system/info") + if [ "$HTTP_STATUS" -eq 200 ]; then + echo "API is now available!" + break + fi + echo "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." + sleep 5 + done +} + # Installing Dependencies with the 3 core dependencies (curl;sudo;mc) msg_info "Installing Dependencies" $STD apt-get install -y \ @@ -86,6 +99,50 @@ unzip -q -d /opt/fileflows $temp_file systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" +# Modify ffmpeg and ffprobe variables so they point to correct locations +msg_info "Setting ffmpeg variables in fileflows" +wait_for_api + +FFMPEG_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') +echo "ffmpeg UID: $FFMPEG_UID" + +FFPROBE_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') +echo "ffprobe UID: $FFPROBE_UID" + +curl -X 'DELETE' \ + "http://${IP}:19200/api/variable" \ + -H 'accept: */*' \ + -H 'Content-Type: application/json' \ + -d "{ + \"Uids\": [ + \"$FFMPEG_UID\", + \"$FFPROBE_UID\" + ] +}" + +FFMPEG_PATH=$(which ffmpeg) +FFPROBE_PATH=$(which ffprobe) + +curl -X 'POST' \ + "http://${IP}:19200/api/variable" \ + -H 'accept: */*' \ + -H 'Content-Type: application/json' \ + -d "{ + \"Name\": \"ffmpeg\", + \"Value\": \"$FFMPEG_PATH\" +}" + +curl -X 'POST' \ + "http://${IP}:19200/api/variable" \ + -H 'accept: */*' \ + -H 'Content-Type: application/json' \ + -d "{ + \"Name\": \"ffprobe\", + \"Value\": \"$FFPROBE_PATH\" +}" + +echo "ffmpeg and ffprobe variables have been updated successfully." + motd_ssh customize From f4a2939e557ba7412873a7510538cddb5a6fafb5 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:47:34 -0400 Subject: [PATCH 32/64] fix: use localhost --- install/fileflows-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 4bd1e1b..d5f8be0 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -17,7 +17,7 @@ update_os wait_for_api() { echo "Waiting for API to become available..." while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://${IP}:19200/api/system/info") + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info") if [ "$HTTP_STATUS" -eq 200 ]; then echo "API is now available!" break @@ -103,14 +103,14 @@ msg_ok "Setup ${APPLICATION}" msg_info "Setting ffmpeg variables in fileflows" wait_for_api -FFMPEG_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') +FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') echo "ffmpeg UID: $FFMPEG_UID" -FFPROBE_UID=$(curl -s -X 'GET' "http://${IP}:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') +FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') echo "ffprobe UID: $FFPROBE_UID" curl -X 'DELETE' \ - "http://${IP}:19200/api/variable" \ + "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d "{ @@ -124,7 +124,7 @@ FFMPEG_PATH=$(which ffmpeg) FFPROBE_PATH=$(which ffprobe) curl -X 'POST' \ - "http://${IP}:19200/api/variable" \ + "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d "{ @@ -133,7 +133,7 @@ curl -X 'POST' \ }" curl -X 'POST' \ - "http://${IP}:19200/api/variable" \ + "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d "{ From 879644eb3bec505b4375cd9c8ab893287e191527 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:54:48 -0400 Subject: [PATCH 33/64] fix: ignore errors --- install/fileflows-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index d5f8be0..69afefa 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -15,14 +15,14 @@ network_check update_os wait_for_api() { - echo "Waiting for API to become available..." + msg_info "Waiting for API to become available..." while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info") + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") if [ "$HTTP_STATUS" -eq 200 ]; then - echo "API is now available!" + msg_info "API is now available!" break fi - echo "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." + msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." sleep 5 done } @@ -141,7 +141,7 @@ curl -X 'POST' \ \"Value\": \"$FFPROBE_PATH\" }" -echo "ffmpeg and ffprobe variables have been updated successfully." +msg_ok "ffmpeg and ffprobe variables have been updated successfully." motd_ssh customize From fa31e5f2c94fa9892085af0627574a59c7af7be6 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Tue, 11 Mar 2025 23:58:30 -0400 Subject: [PATCH 34/64] fix: silent curl --- install/fileflows-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 69afefa..dc501cb 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -109,7 +109,7 @@ echo "ffmpeg UID: $FFMPEG_UID" FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') echo "ffprobe UID: $FFPROBE_UID" -curl -X 'DELETE' \ +curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -123,7 +123,7 @@ curl -X 'DELETE' \ FFMPEG_PATH=$(which ffmpeg) FFPROBE_PATH=$(which ffprobe) -curl -X 'POST' \ +curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -132,7 +132,7 @@ curl -X 'POST' \ \"Value\": \"$FFMPEG_PATH\" }" -curl -X 'POST' \ +curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ From b5862634b3e3915fa6b1a3b3229dcead2222e582 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:01:01 -0400 Subject: [PATCH 35/64] fix: remove debug echos --- install/fileflows-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index dc501cb..f8f75db 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -104,10 +104,7 @@ msg_info "Setting ffmpeg variables in fileflows" wait_for_api FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') -echo "ffmpeg UID: $FFMPEG_UID" - FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') -echo "ffprobe UID: $FFPROBE_UID" curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ From 69ad6930504b46e7db30fbb93549e566e2b3b300 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:05:28 -0400 Subject: [PATCH 36/64] fix: silent curl --- install/fileflows-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index f8f75db..1e524f2 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -127,7 +127,7 @@ curl -s -X 'POST' \ -d "{ \"Name\": \"ffmpeg\", \"Value\": \"$FFMPEG_PATH\" -}" +}" 2>/dev/null curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ @@ -136,7 +136,7 @@ curl -s -X 'POST' \ -d "{ \"Name\": \"ffprobe\", \"Value\": \"$FFPROBE_PATH\" -}" +}" 2>/dev/null msg_ok "ffmpeg and ffprobe variables have been updated successfully." From a6dcb62014674a11fda54dd22817398cca62b760 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:09:42 -0400 Subject: [PATCH 37/64] fix: silent curl --- install/fileflows-install.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 1e524f2..960267f 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -124,19 +124,13 @@ curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{ - \"Name\": \"ffmpeg\", - \"Value\": \"$FFMPEG_PATH\" -}" 2>/dev/null + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" /dev/null curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{ - \"Name\": \"ffprobe\", - \"Value\": \"$FFPROBE_PATH\" -}" 2>/dev/null + -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" /dev/null msg_ok "ffmpeg and ffprobe variables have been updated successfully." From f7bae3a12ec01e0d44e955d624257d4a72f14bc8 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 00:12:20 -0400 Subject: [PATCH 38/64] fix: silent curl --- install/fileflows-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 960267f..ca2d844 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -106,7 +106,7 @@ wait_for_api FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') -curl -s -X 'DELETE' \ +$STD curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -120,17 +120,17 @@ curl -s -X 'DELETE' \ FFMPEG_PATH=$(which ffmpeg) FFPROBE_PATH=$(which ffprobe) -curl -s -X 'POST' \ +$STD curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" /dev/null + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" -curl -s -X 'POST' \ +$STD curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" /dev/null + -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" msg_ok "ffmpeg and ffprobe variables have been updated successfully." From 6fd4a0c157d45ef5e79db59c551ae364fac7ce03 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 22:50:56 -0400 Subject: [PATCH 39/64] chore: change update url to my repo --- misc/install.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index f37d199..28a953a 100644 --- a/misc/install.func +++ b/misc/install.func @@ -258,7 +258,8 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + + echo "bash -c \"\$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then From 68f6f35a0d1525d38d2af009e44f3928997622b4 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 22:59:28 -0400 Subject: [PATCH 40/64] fix: use localhost --- ct/fileflows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 6f70fda..967fb2f 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -30,7 +30,7 @@ function update_script() { exit fi - UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://${IP}:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) + UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then msg_info "Stopping $APP" systemctl stop fileflows From 8d1c6c82d09d798812c99136b577232565f3ac8c Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:00:14 -0400 Subject: [PATCH 41/64] test: update --- ct/fileflows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 967fb2f..18907e0 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -31,7 +31,7 @@ function update_script() { fi UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) - if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then + if [[ "${UPDATE_AVAILABLE}" == "false" ]]; then msg_info "Stopping $APP" systemctl stop fileflows msg_ok "Stopped $APP" From 177d788d3f5c342d4253d4940eb52c9da8b918d9 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:00:46 -0400 Subject: [PATCH 42/64] test: update --- ct/fileflows.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 18907e0..1f110ae 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -31,6 +31,7 @@ function update_script() { fi UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) + echo $UPDATE_AVAILABLE if [[ "${UPDATE_AVAILABLE}" == "false" ]]; then msg_info "Stopping $APP" systemctl stop fileflows From b6c0430e4620748bf012716e9ca575ad5ca567d6 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:01:57 -0400 Subject: [PATCH 43/64] test: update --- ct/fileflows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 1f110ae..3bcda8e 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -31,7 +31,7 @@ function update_script() { fi UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) - echo $UPDATE_AVAILABLE + msg_error $UPDATE_AVAILABLE if [[ "${UPDATE_AVAILABLE}" == "false" ]]; then msg_info "Stopping $APP" systemctl stop fileflows From 5683b00f543d1f4f287ae0273ecfdca6dce16eb5 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:07:46 -0400 Subject: [PATCH 44/64] test: undo testing --- ct/fileflows.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 3bcda8e..967fb2f 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -31,8 +31,7 @@ function update_script() { fi UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) - msg_error $UPDATE_AVAILABLE - if [[ "${UPDATE_AVAILABLE}" == "false" ]]; then + if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then msg_info "Stopping $APP" systemctl stop fileflows msg_ok "Stopped $APP" From 4e7e4c148f03189440b5f002b709a8f55fb8af6e Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:08:55 -0400 Subject: [PATCH 45/64] chore: update disk to 8GBs --- ct/fileflows.sh | 2 +- json/fileflows.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 967fb2f..60a3c3c 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -9,7 +9,7 @@ APP="FileFlows" var_tags="media;automation" var_cpu="2" var_ram="2048" -var_disk="4" +var_disk="8" var_os="debian" var_version="12" var_unprivileged="1" diff --git a/json/fileflows.json b/json/fileflows.json index ddc6ca0..9365360 100644 --- a/json/fileflows.json +++ b/json/fileflows.json @@ -20,7 +20,7 @@ "resources": { "cpu": 2, "ram": 2, - "hdd": 4, + "hdd": 8, "os": "Debian", "version": "12" } From c234f1bdaba918105008abc1e575f1bfb6bfb976 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:09:44 -0400 Subject: [PATCH 46/64] chore: update json --- json/fileflows.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/fileflows.json b/json/fileflows.json index 9365360..d3b301c 100644 --- a/json/fileflows.json +++ b/json/fileflows.json @@ -7,7 +7,7 @@ "date_created": "2025-03-07", "type": "ct", "updateable": true, - "privileged": true, + "privileged": false, "interface_port": 19200, "documentation": "https://fileflows.com/docs", "website": "https://fileflows.com/", From a327ece6ce85dad582b702b7187a1b52a75ab450 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:13:20 -0400 Subject: [PATCH 47/64] Revert "test: update misc links" This reverts commit d567436579d3a18181974894a362aa3ec39ad060. --- misc/build.func | 14 +++++++------- misc/install.func | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/build.func b/misc/build.func index af820ad..b8479c0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -14,7 +14,7 @@ variables() { RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } -source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -69,7 +69,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) + source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -1084,9 +1084,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" @@ -1121,7 +1121,7 @@ build_container() { # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/create_lxc.sh)" || exit $? + bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -1183,7 +1183,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } @@ -1196,7 +1196,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index 28a953a..98fbd53 100644 --- a/misc/install.func +++ b/misc/install.func @@ -68,7 +68,7 @@ catch_errors() { # This function handles errors error_handler() { - source <(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) + source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" From e238be2d3c9889ccae976fe2c922e50052bde494 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:13:37 -0400 Subject: [PATCH 48/64] Revert "chore: change update url to my repo" This reverts commit 6fd4a0c157d45ef5e79db59c551ae364fac7ce03. --- misc/install.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/install.func b/misc/install.func index 98fbd53..98e4418 100644 --- a/misc/install.func +++ b/misc/install.func @@ -258,8 +258,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - - echo "bash -c \"\$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/${app}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then From 32c28e0aa71ce7b1c87b9bf5eea80b1929c281b6 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:25:38 -0400 Subject: [PATCH 49/64] fix: lowercase variables --- ct/fileflows.sh | 4 ++-- install/fileflows-install.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 60a3c3c..15595e4 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -30,8 +30,8 @@ function update_script() { exit fi - UPDATE_AVAILABLE=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) - if [[ "${UPDATE_AVAILABLE}" == "true" ]]; then + update_available=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable) + if [[ "${update_available}" == "true" ]]; then msg_info "Stopping $APP" systemctl stop fileflows msg_ok "Stopped $APP" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index ca2d844..b937c58 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -103,8 +103,8 @@ msg_ok "Setup ${APPLICATION}" msg_info "Setting ffmpeg variables in fileflows" wait_for_api -FFMPEG_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') -FFPROBE_UID=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') +ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') +ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') $STD curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ @@ -112,25 +112,25 @@ $STD curl -s -X 'DELETE' \ -H 'Content-Type: application/json' \ -d "{ \"Uids\": [ - \"$FFMPEG_UID\", - \"$FFPROBE_UID\" + \"$ffmpeg_uid\", + \"$ffprobe_uid\" ] }" -FFMPEG_PATH=$(which ffmpeg) -FFPROBE_PATH=$(which ffprobe) +ffmpeg_path=$(which ffmpeg) +ffprobe_path=$(which ffprobe) $STD curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$FFMPEG_PATH\"}" + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}" $STD curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$FFPROBE_PATH\"}" + -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}" msg_ok "ffmpeg and ffprobe variables have been updated successfully." From 6718bb3318f4dbea01cd6ecfca3f79dcefd5aacd Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Wed, 12 Mar 2025 23:30:23 -0400 Subject: [PATCH 50/64] fix: messages --- install/fileflows-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index b937c58..b1ab6a3 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -79,8 +79,7 @@ if [[ "$CTTYPE" == "0" ]]; then $STD adduser $(id -u -n) video $STD adduser $(id -u -n) render fi -msg_ok "Installed Hardware Acceleration" -msg_ok "Set Up Hardware Acceleration" +msg_ok "Installed and Set Up Hardware Acceleration" msg_info "Installing ASP.NET Core Runtime" wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb From ceff4e241ad6e5635505a34ab4176b31bb172446 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 19:36:46 -0400 Subject: [PATCH 51/64] chore: Resolve some comments --- install/fileflows-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index b1ab6a3..4a7b2e1 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -19,7 +19,7 @@ wait_for_api() { while true; do HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") if [ "$HTTP_STATUS" -eq 200 ]; then - msg_info "API is now available!" + msg_ok "API is now available!" break fi msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." @@ -36,7 +36,7 @@ $STD apt-get install -y \ jq # Used for updating checking from json response msg_ok "Installed Dependencies" -msg_info "Installing FFmpeg (Patience)" +msg_info "Installing FFmpeg" wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb $STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb cat </etc/apt/sources.list.d/backports.list @@ -44,7 +44,8 @@ deb https://www.deb-multimedia.org bookworm main non-free deb https://www.deb-multimedia.org bookworm-backports main EOF $STD apt update -DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y +DEBIAN_FRONTEND=noninteractive +$STD apt-get install -t bookworm-backports ffmpeg -y rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb $STD apt update msg_ok "Installed FFmpeg" From a6fc1dd4d2f614add180f8ee9e64f18f64b00060 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 19:57:29 -0400 Subject: [PATCH 52/64] chore: deleted the backup --- ct/fileflows.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 15595e4..cf13b28 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -38,7 +38,8 @@ function update_script() { # Creating Backup msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" -C /opt/fileflows Data + backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz" + tar -czf $backup_filename -C /opt/fileflows Data msg_ok "Backup Created" # Execute Update @@ -56,6 +57,7 @@ function update_script() { # Cleaning up msg_info "Cleaning Up" rm -rf $temp_file + rm -rf $backup_filename msg_ok "Cleanup Completed" # Last Action From b9d415e7a107f91405a0d48f6a05d10c97a0fc24 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 19:58:46 -0400 Subject: [PATCH 53/64] chore: deleted comments --- ct/fileflows.sh | 6 ------ install/fileflows-install.sh | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index cf13b28..45d9c51 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -24,7 +24,6 @@ function update_script() { check_container_storage check_container_resources - # Check if installation is present | -f for file, -d for folder if [[ ! -d /opt/fileflows ]]; then msg_error "No ${APP} Installation Found!" exit @@ -36,31 +35,26 @@ function update_script() { systemctl stop fileflows msg_ok "Stopped $APP" - # Creating Backup msg_info "Creating Backup" backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz" tar -czf $backup_filename -C /opt/fileflows Data msg_ok "Backup Created" - # Execute Update msg_info "Updating $APP to latest version" temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -oq -d /opt/fileflows $temp_file msg_ok "Updated $APP to latest version" - # Starting Services msg_info "Starting $APP" systemctl start fileflows msg_ok "Started $APP" - # Cleaning up msg_info "Cleaning Up" rm -rf $temp_file rm -rf $backup_filename msg_ok "Cleanup Completed" - # Last Action msg_ok "Update Successful" else msg_ok "No update required. ${APP} is already at latest version" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 4a7b2e1..ec82b77 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -27,13 +27,12 @@ wait_for_api() { done } -# Installing Dependencies with the 3 core dependencies (curl;sudo;mc) msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ sudo \ mc \ - jq # Used for updating checking from json response + jq msg_ok "Installed Dependencies" msg_info "Installing FFmpeg" @@ -90,7 +89,6 @@ $STD apt-get update $STD apt-get install -y aspnetcore-runtime-8.0 msg_ok "Installed ASP.NET Core Runtime" -# Setup App msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file @@ -99,7 +97,6 @@ unzip -q -d /opt/fileflows $temp_file systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" -# Modify ffmpeg and ffprobe variables so they point to correct locations msg_info "Setting ffmpeg variables in fileflows" wait_for_api @@ -137,7 +134,6 @@ msg_ok "ffmpeg and ffprobe variables have been updated successfully." motd_ssh customize -# Cleanup msg_info "Cleaning up" rm -f $temp_file $STD apt-get -y autoremove From b26c7e7d450ec650459442b7a133b9d9d426be76 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:27:56 -0400 Subject: [PATCH 54/64] chore: more PR comments --- install/fileflows-install.sh | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index ec82b77..93cfd60 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -14,19 +14,6 @@ setting_up_container network_check update_os -wait_for_api() { - msg_info "Waiting for API to become available..." - while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") - if [ "$HTTP_STATUS" -eq 200 ]; then - msg_ok "API is now available!" - break - fi - msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." - sleep 5 - done -} - msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ @@ -46,7 +33,6 @@ $STD apt update DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb -$STD apt update msg_ok "Installed FFmpeg" msg_info "Setting Up Hardware Acceleration" @@ -103,7 +89,7 @@ wait_for_api ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') -$STD curl -s -X 'DELETE' \ +response=$(curl -s -X 'DELETE' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ @@ -112,22 +98,22 @@ $STD curl -s -X 'DELETE' \ \"$ffmpeg_uid\", \"$ffprobe_uid\" ] -}" +}") ffmpeg_path=$(which ffmpeg) ffprobe_path=$(which ffprobe) -$STD curl -s -X 'POST' \ +response=$(curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}" + -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}") -$STD curl -s -X 'POST' \ +response=$(curl -s -X 'POST' \ "http://localhost:19200/api/variable" \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}" + -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}") msg_ok "ffmpeg and ffprobe variables have been updated successfully." From 6caca0e60b7274e661d57353ba93a1a3c4e4921a Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:30:59 -0400 Subject: [PATCH 55/64] Reapply "chore: change update url to my repo" This reverts commit e238be2d3c9889ccae976fe2c922e50052bde494. --- misc/install.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 98e4418..98fbd53 100644 --- a/misc/install.func +++ b/misc/install.func @@ -258,7 +258,8 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update + + echo "bash -c \"\$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then From 77d3f2a4fc75aea5b0e10f3d8553ba28397b9974 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:34:30 -0400 Subject: [PATCH 56/64] chore: test my branch --- misc/build.func | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 2972e18..8312c47 100644 --- a/misc/build.func +++ b/misc/build.func @@ -14,7 +14,7 @@ variables() { RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -72,7 +72,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) + source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -1104,9 +1104,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" @@ -1140,7 +1140,7 @@ build_container() { " # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? + bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/create_lxc.sh)" || exit $? LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -1202,7 +1202,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/install/$var_install.sh)" || exit $? } @@ -1215,7 +1215,7 @@ description() { cat < - Logo + Logo

${APP} LXC

From ea7e4a1899186a88e1c177bf6bd5b97837a39c31 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:38:40 -0400 Subject: [PATCH 57/64] fix: remove deleted wait_for_api --- install/fileflows-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 93cfd60..97a8745 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -84,7 +84,6 @@ systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" msg_info "Setting ffmpeg variables in fileflows" -wait_for_api ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') From 75d37cd2aaa59fe24524d84342ad13ee99d76fc2 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:46:42 -0400 Subject: [PATCH 58/64] fix: forgot to inline api check lol --- install/fileflows-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 97a8745..7b26ca8 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -84,6 +84,16 @@ systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" msg_info "Setting ffmpeg variables in fileflows" +msg_info "Waiting for API to become available..." +while true; do + HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") + if [ "$HTTP_STATUS" -eq 200 ]; then + msg_ok "API is now available!" + break + fi + msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." + sleep 5 +done ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') From 7e7c0c157cc308ae0f8c637f7f198728275ae73e Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 22:57:17 -0400 Subject: [PATCH 59/64] Revert "chore: test my branch" This reverts commit 77d3f2a4fc75aea5b0e10f3d8553ba28397b9974. --- misc/build.func | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 8312c47..2972e18 100644 --- a/misc/build.func +++ b/misc/build.func @@ -14,7 +14,7 @@ variables() { RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } -source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) # This function sets various color variables using ANSI escape codes for formatting text in the terminal. color() { @@ -72,7 +72,7 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/api.func) + source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -1104,9 +1104,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)" fi export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" @@ -1140,7 +1140,7 @@ build_container() { " # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/create_lxc.sh)" || exit $? + bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/create_lxc.sh)" || exit $? LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -1202,7 +1202,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/install/$var_install.sh)" || exit $? + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $? } @@ -1215,7 +1215,7 @@ description() { cat < - Logo + Logo

${APP} LXC

From f05ba8a8105efff09c368cc7b700f435d23f3fed Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 23:00:41 -0400 Subject: [PATCH 60/64] Revert "Reapply "chore: change update url to my repo"" This reverts commit 6caca0e60b7274e661d57353ba93a1a3c4e4921a. --- misc/install.func | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/install.func b/misc/install.func index 98fbd53..98e4418 100644 --- a/misc/install.func +++ b/misc/install.func @@ -258,8 +258,7 @@ EOF systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') msg_ok "Customized Container" fi - - echo "bash -c \"\$(wget -qLO - https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/ct/${app}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then From cb6d92b7e0c1a276c780421d314edf9c1392a76b Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Thu, 13 Mar 2025 23:36:55 -0400 Subject: [PATCH 61/64] fix: do not duplicate main and contrib --- install/fileflows-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 7b26ca8..40c805b 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -42,14 +42,14 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Hardware Acceleration (non-free)" cat </etc/apt/sources.list.d/non-free.list -deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +deb http://deb.debian.org/debian bookworm non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware -deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware -deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +deb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware +deb-src http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware -deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware -deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware +deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware +deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware EOF $STD apt-get update $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} From 5866673dd1b1e1e37d1e01ffe5e27d9bbc5c3dda Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 16 Mar 2025 13:05:03 -0400 Subject: [PATCH 62/64] Squashed commit of the following: commit 3aed8610af1d540864005b75e15dd731b4e17517 Author: Kyle Kroboth Date: Sun Mar 16 12:49:15 2025 -0400 docs: update comment commit a23ffe62c6c89fe0fae6c2660589c87ea0355b81 Author: Kyle Kroboth Date: Sun Mar 16 12:47:00 2025 -0400 chore: remove test file commit 1f589e64d04eb816cd1e2d472f4ba92cc2649da7 Author: Kyle Kroboth Date: Sun Mar 16 12:46:28 2025 -0400 chore: remove perm fixes commit c4421b80e81e8608cc2d1020e79e3649a0402d0b Author: Kyle Kroboth Date: Sun Mar 16 11:20:18 2025 -0400 fix: read input correctly commit 2b5e083c6070e6617c08dbf6d2b832be246b5d59 Author: Kyle Kroboth Date: Sun Mar 16 10:48:05 2025 -0400 test: do not change user groups for HW commit 9edc87de747b3b16a91ac5420d5aacb8276b795d Author: Kyle Kroboth Date: Sun Mar 16 10:46:23 2025 -0400 chore: more nits commit 8dcf55fc28023666a664b5abbd3f3024bf3d9797 Author: Kyle Kroboth Date: Sun Mar 16 10:37:40 2025 -0400 chore: ln ffmpeg commit e21430cee818cc5d7c0cc6f1b5421de6cca89688 Author: Kyle Kroboth Date: Sat Mar 15 11:49:16 2025 -0400 test: video file commit b32605fd3cfd5d07e0c5e30d8091753f024bb99e Author: Kyle Kroboth Date: Sat Mar 15 11:42:42 2025 -0400 test: video file commit 02b5743ceeb91656f9d7f088325e999d5bf69e88 Author: Kyle Kroboth Date: Sat Mar 15 11:41:13 2025 -0400 Revert "test: remove non-free driver" This reverts commit 8b8e70211b75ce4b2e7a4300a074925a3795ed16. commit 8b8e70211b75ce4b2e7a4300a074925a3795ed16 Author: Kyle Kroboth Date: Sat Mar 15 11:33:23 2025 -0400 test: remove non-free driver commit 5d2e1ad7b41b81e0a2030382a054e0de83ffb818 Author: Kyle Kroboth Date: Sat Mar 15 11:23:04 2025 -0400 test: update my repo url commit 8564a495af796c5d456aeba0d504f2ccd426adc8 Author: Kyle Kroboth Date: Sat Mar 15 11:08:34 2025 -0400 test: Remove ffmpeg custom install commit 9641bd85b2294f0ab97e2c153a781079d1638ec2 Author: Kyle Kroboth Date: Sat Mar 15 11:04:57 2025 -0400 test: use my repo for testing script commit 4dd1c10c6a9385bf67c22c460e57bae4dd8a4300 Author: Kyle Kroboth Date: Sat Mar 15 11:04:03 2025 -0400 Reapply "chore: test my branch" This reverts commit 7e7c0c157cc308ae0f8c637f7f198728275ae73e. commit bdc08c48245447fa7d77df66d8cabd172e2e8ab7 Author: Kyle Kroboth Date: Sat Mar 15 11:04:03 2025 -0400 Reapply "Reapply "chore: change update url to my repo"" This reverts commit f05ba8a8105efff09c368cc7b700f435d23f3fed. --- ct/fileflows.sh | 2 +- install/fileflows-install.sh | 84 +++++------------------------------- 2 files changed, 12 insertions(+), 74 deletions(-) diff --git a/ct/fileflows.sh b/ct/fileflows.sh index 45d9c51..697d1cf 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kkroboth/ProxmoxVED/refs/heads/lxc-fileflows/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: kkroboth # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 40c805b..a9756b1 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -19,28 +19,14 @@ $STD apt-get install -y \ curl \ sudo \ mc \ - jq + jq \ + ffmpeg msg_ok "Installed Dependencies" -msg_info "Installing FFmpeg" -wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb -$STD dpkg -i deb-multimedia-keyring_2024.9.1_all.deb -cat </etc/apt/sources.list.d/backports.list -deb https://www.deb-multimedia.org bookworm main non-free -deb https://www.deb-multimedia.org bookworm-backports main -EOF -$STD apt update -DEBIAN_FRONTEND=noninteractive -$STD apt-get install -t bookworm-backports ffmpeg -y -rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb -msg_ok "Installed FFmpeg" - -msg_info "Setting Up Hardware Acceleration" - -read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? " prompt +read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then msg_info "Installing Hardware Acceleration (non-free)" -cat </etc/apt/sources.list.d/non-free.list + cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware @@ -51,21 +37,14 @@ deb-src http://deb.debian.org/debian-security bookworm-security non-free non-fre deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware EOF -$STD apt-get update -$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + $STD apt-get update + $STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} else - msg_info "Installing Hardware Acceleration" -$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} + msg_info "Installing Intel Hardware Acceleration" + $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} fi -if [[ "$CTTYPE" == "0" ]]; then - chgrp video /dev/dri - chmod 755 /dev/dri - chmod 660 /dev/dri/* - $STD adduser $(id -u -n) video - $STD adduser $(id -u -n) render -fi -msg_ok "Installed and Set Up Hardware Acceleration" +msg_ok "Installed and Set Up Intel Hardware Acceleration" msg_info "Installing ASP.NET Core Runtime" wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb @@ -76,6 +55,8 @@ $STD apt-get install -y aspnetcore-runtime-8.0 msg_ok "Installed ASP.NET Core Runtime" msg_info "Setup ${APPLICATION}" +$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg +$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe temp_file=$(mktemp) wget -q https://fileflows.com/downloads/zip -O $temp_file unzip -q -d /opt/fileflows $temp_file @@ -83,49 +64,6 @@ unzip -q -d /opt/fileflows $temp_file systemctl enable -q --now fileflows.service msg_ok "Setup ${APPLICATION}" -msg_info "Setting ffmpeg variables in fileflows" -msg_info "Waiting for API to become available..." -while true; do - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:19200/api/system/info" 2>/dev/null || echo "000") - if [ "$HTTP_STATUS" -eq 200 ]; then - msg_ok "API is now available!" - break - fi - msg_info "API not ready yet (status: $HTTP_STATUS). Retrying in 5 seconds..." - sleep 5 -done - -ffmpeg_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffmpeg" -H 'accept: application/json' | jq -r '.Uid') -ffprobe_uid=$(curl -s -X 'GET' "http://localhost:19200/api/variable/name/ffprobe" -H 'accept: application/json' | jq -r '.Uid') - -response=$(curl -s -X 'DELETE' \ - "http://localhost:19200/api/variable" \ - -H 'accept: */*' \ - -H 'Content-Type: application/json' \ - -d "{ - \"Uids\": [ - \"$ffmpeg_uid\", - \"$ffprobe_uid\" - ] -}") - -ffmpeg_path=$(which ffmpeg) -ffprobe_path=$(which ffprobe) - -response=$(curl -s -X 'POST' \ - "http://localhost:19200/api/variable" \ - -H 'accept: */*' \ - -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffmpeg\",\"Value\":\"$ffmpeg_path\"}") - -response=$(curl -s -X 'POST' \ - "http://localhost:19200/api/variable" \ - -H 'accept: */*' \ - -H 'Content-Type: application/json' \ - -d "{\"Name\":\"ffprobe\",\"Value\":\"$ffprobe_path\"}") - -msg_ok "ffmpeg and ffprobe variables have been updated successfully." - motd_ssh customize From 3282a38e9a3d2483e463cc2d0eb15f67dd7a262b Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 16 Mar 2025 13:05:49 -0400 Subject: [PATCH 63/64] chore: remove unused `jq` --- install/fileflows-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index a9756b1..7238869 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -19,7 +19,6 @@ $STD apt-get install -y \ curl \ sudo \ mc \ - jq \ ffmpeg msg_ok "Installed Dependencies" From 9804eb90787012583ba20aadea1d7e654f040796 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sun, 16 Mar 2025 13:12:27 -0400 Subject: [PATCH 64/64] chore: small nits --- install/fileflows-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 7238869..8eb883b 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Installing Hardware Acceleration (non-free)" + msg_info "Installing Intel Hardware Acceleration (non-free)" cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm non-free non-free-firmware @@ -42,7 +42,6 @@ else msg_info "Installing Intel Hardware Acceleration" $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} fi - msg_ok "Installed and Set Up Intel Hardware Acceleration" msg_info "Installing ASP.NET Core Runtime"